Electrical energy storage system with battery power setpoint optimization using predicted values of a frequency regulation signal

ABSTRACT

A frequency response optimization includes a battery that stores and discharges electric power, a power inverter that uses battery power setpoints to control an amount of the electric power stored or discharged from the battery, and a frequency response controller. The frequency response controller receives a regulation signal from an incentive provider, predicts future values of the regulation signal, and uses the predicted values of the regulation signal to generate the battery power setpoints for the power inverter.

CROSS-REFERENCE TO RELATED PATENT APPLICATIONS

This application claims the benefit of and priority to U.S. ProvisionalPatent Application No. 62/239,131, U.S. Provisional Patent ApplicationNo. 62/239,231, U.S. Provisional Patent Application No. 62/239,233, U.S.Provisional Patent Application No. 62/239,245, U.S. Provisional PatentApplication No. 62/239,246, and U.S. Provisional Patent Application No.62/239,249, each of which has a filing date of Oct. 8, 2015. The entiredisclosure of each of these patent applications is incorporated byreference herein.

BACKGROUND

The present disclosure relates generally to frequency response systemsconfigured to add or remove electricity from an energy grid, and moreparticularly to a frequency response controller that determines optimalpower setpoints for a battery power inverter in a frequency responsesystem.

Stationary battery storage has several purposes when integrated withcampus electrical distribution. For example, battery storage can be usedto participate in a local frequency response program. Battery storagecan be used to reduce the energy used during times when electricity isexpensive and to reduce the electrical demand of a building to reducethe demand charge incurred.

Some frequency response programs allow participants to set the midpointof regulation around which they must modify their load in response to aregulation signal. However, it is difficult and challenging to determinean optimal adjustment of the midpoint which allows the battery storagecontroller to actively participate in the frequency response marketwhile also taking into account the energy and demand charge that will beincurred.

SUMMARY

One implementation of the present disclosure is a frequency responseoptimization system. The system includes a battery that stores anddischarges electric power, a power inverter that uses battery powersetpoints to control an amount of the electric power stored ordischarged from the battery, and a frequency response controller. Thefrequency response controller receives a regulation signal from anincentive provider, predicts future values of the regulation signal, anduses the predicted values of the regulation signal to generate thebattery power setpoints for the power inverter.

In some embodiments, the frequency response controller uses anautoregressive model to predict the future values of the regulationsignal based on a history of past values of the regulation signal.

In some embodiments, the frequency response controller includes a lowpass filter that filters the predicted values of the regulation signal.The frequency response controller may use the filtered values of theregulation signal to generate the battery power setpoints.

In some embodiments, the frequency response controller generates anobjective function including an estimated amount of frequency responserevenue that will result from the battery power setpoints and anestimated cost of battery degradation that will result from the batterypower setpoints. In some embodiments, the frequency response controlleruses dynamic programming to select scaling coefficients for theregulation signal and adjusts the scaling coefficients to achieve anoptimal value for the objective function.

In some embodiments, the frequency response controller calculates afrequency response performance score that will result from the batterypower setpoints and uses the frequency response performance score toestimate an amount of frequency response revenue that will result fromthe battery power setpoints.

In some embodiments, the frequency response controller uses a batterylife model to estimate an amount of battery degradation that will resultfrom the battery power setpoints and uses the estimated amount ofbattery degradation to determine a cost of the battery degradation. Insome embodiments, the battery life model includes a plurality ofvariables that depend on the battery power setpoints. The variables mayinclude at least one of a temperature of the battery, a state of chargeof the battery, a depth of discharge of the battery, a power ratio ofthe battery, and an effort ratio of the battery.

In some embodiments, the frequency response controller comprisesincludes a high level controller and a low level controller. The highlevel controller may generate filter parameters based on the predictedvalues of the regulation signal. The low level controller may use thefilter parameters to filter the predicted regulation signal anddetermine the optimal battery power setpoints using the filteredregulation signal.

In some embodiments, the system includes a campus having a campus powerusage and a point of intersection at which the campus power usagecombines with the electric power discharged from the battery. Thefrequency response controller may determine the optimal battery powersetpoints based on both the campus power usage and the frequencyresponse signal.

Another implementation of the present disclosure is a method forgenerating battery power setpoints in a frequency response optimizationsystem. The method includes receiving a frequency regulation signal froman incentive provider, predicting future values of the frequencyregulation signal, using the predicted values of the frequencyregulation signal to generate battery power setpoints, providing thebattery power setpoints to a power inverter, and using the battery powersetpoints to control an amount of electric power stored or discharged bythe battery in response to the frequency response signal.

In some embodiments, predicting future values of the frequencyregulation signal comprises using an autoregressive model to predict thefuture values of the frequency regulation signal based on a history ofpast values of the frequency regulation signal.

In some embodiments, the method includes filtering the predicted valuesof the regulation signal using a low pass filter and using the filteredvalues of the regulation signal to generate the battery power setpoints.

In some embodiments, the method includes generating an objectivefunction. The objective function may include an estimated amount offrequency response revenue that will result from the battery powersetpoints and an estimated cost of battery degradation that will resultfrom the battery power setpoints. In some embodiments, the methodincludes using dynamic programming to select scaling coefficients forthe regulation signal and adjust the scaling coefficients to achieve anoptimal value for the objective function.

In some embodiments, the method includes calculating a frequencyresponse performance score that will result from the battery powersetpoints and using the frequency response performance score to estimatean amount of frequency response revenue that will result from thebattery power setpoints.

In some embodiments, the method includes using a battery life model toestimate an amount of battery degradation that will result from thebattery power setpoints and using the estimated amount of batterydegradation to determine a cost of the battery degradation. In someembodiments, the battery life model includes a plurality of variablesthat depend on the battery power setpoints. The variables may include atleast one of a temperature of the battery, a state of charge of thebattery, a depth of discharge of the battery, a power ratio of thebattery, and an effort ratio of the battery.

In some embodiments, the method includes using a high level controllerto generate filter parameters based on the predicted values of theregulation signal and using a low level controller to filter thepredicted regulation signal based on the filter parameters and determinethe optimal battery power setpoints using the filtered regulationsignal.

In some embodiments, the frequency regulation system includes a campushaving a campus power usage and a point of intersection at which thecampus power usage combines with the electric power discharged from thebattery. The method may further include determining the optimal batterypower setpoints based on both the campus power usage and the frequencyresponse signal.

Those skilled in the art will appreciate that the summary isillustrative only and is not intended to be in any way limiting. Otheraspects, inventive features, and advantages of the devices and/orprocesses described herein, as defined solely by the claims, will becomeapparent in the detailed description set forth herein and taken inconjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a frequency response optimization system,according to an exemplary embodiment.

FIG. 2 is a graph of a regulation signal which may be provided to thesystem of FIG. 1 and a frequency response signal which may be generatedby the system of FIG. 1, according to an exemplary embodiment.

FIG. 3 is a block diagram illustrating the frequency response controllerof FIG. 1 in greater detail, according to an exemplary embodiment.

FIG. 4 is a block diagram illustrating the high level controller of FIG.3 in greater detail, according to an exemplary embodiment.

FIG. 5 is a block diagram illustrating the low level controller of FIG.3 in greater detail, according to an exemplary embodiment.

FIG. 6 is a flowchart of a process for determining frequency responsemidpoints and battery power setpoints that maintain the battery at thesame state of charge at the beginning and end of each frequency responseperiod, according to an exemplary embodiment.

FIG. 7 is a flowchart of a process for determining optimal frequencyresponse midpoints and battery power setpoints in the presence of demandcharges, according to an exemplary embodiment.

FIG. 8 is another block diagram illustrating the low level controller ofFIG. 3 in greater detail in which the low level controller is shown as abaseline controller without cost optimization, according to an exemplaryembodiment.

FIG. 9 is another block diagram illustrating the low level controller ofFIG. 3 in greater detail in which the low level controller is shown asan optimal controller with cost optimization, according to an exemplaryembodiment.

FIG. 10 is another block diagram illustrating the embodiment of the lowlevel controller shown in FIG. 9, according to an exemplary embodiment.

FIG. 11 is a block diagram of an electrical energy storage system thatuses battery storage to perform both ramp rate control and frequencyregulation, according to an exemplary embodiment.

FIG. 12 is a drawing of the electrical energy storage system of FIG. 11,according to an exemplary embodiment.

FIG. 13 is a graph illustrating a reactive ramp rate control techniquewhich can be used by the electrical energy storage system of FIG. 11,according to an exemplary embodiment.

FIG. 14 is a graph illustrating a preemptive ramp rate control techniquewhich can be used by the electrical energy storage system of FIG. 11,according to an exemplary embodiment.

FIG. 15 is a block diagram of a frequency regulation and ramp ratecontroller which can be used to monitor and control the electricalenergy storage system of FIG. 11, according to an exemplary embodiment.

FIG. 16 is a block diagram of a frequency response control system,according to an exemplary embodiment.

FIG. 17 is a block diagram illustrating data flow into a data fusionmodule of the frequency response control system of FIG. 16, according toan exemplary embodiment.

FIG. 18 is a block diagram illustrating a database schema which can beused in the frequency response control system of FIG. 16, according toan exemplary embodiment.

DETAILED DESCRIPTION Frequency Response Optimization

Referring to FIG. 1, a frequency response optimization system 100 isshown, according to an exemplary embodiment. System 100 is shown toinclude a campus 102 and an energy grid 104. Campus 102 may include oneor more buildings 116 that receive power from energy grid 104. Buildings116 may include equipment or devices that consume electricity duringoperation. For example, buildings 116 may include HVAC equipment,lighting equipment, security equipment, communications equipment,vending machines, computers, electronics, elevators, or other types ofbuilding equipment. In some embodiments, buildings 116 are served by abuilding management system (BMS). A BMS is, in general, a system ofdevices configured to control, monitor, and manage equipment in oraround a building or building area. A BMS can include, for example, aHVAC system, a security system, a lighting system, a fire alertingsystem, and/or any other system that is capable of managing buildingfunctions or devices. An exemplary building management system which maybe used to monitor and control buildings 116 is described in U.S. patentapplication Ser. No. 14/717,593, titled “Building Management System forForecasting Time Series Values of Building Variables” and filed May 20,2015, the entire disclosure of which is incorporated by referenceherein.

In some embodiments, campus 102 includes a central plant 118. Centralplant 118 may include one or more subplants that consume resources fromutilities (e.g., water, natural gas, electricity, etc.) to satisfy theloads of buildings 116. For example, central plant 118 may include aheater subplant, a heat recovery chiller subplant, a chiller subplant, acooling tower subplant, a hot thermal energy storage (TES) subplant, anda cold thermal energy storage (TES) subplant, a steam subplant, and/orany other type of subplant configured to serve buildings 116. Thesubplants may be configured to convert input resources (e.g.,electricity, water, natural gas, etc.) into output resources (e.g., coldwater, hot water, chilled air, heated air, etc.) that are provided tobuildings 116. An exemplary central plant which may be used to satisfythe loads of buildings 116 is described U.S. patent application Ser. No.14/634,609, titled “High Level Central Plant Optimization” and filedFeb. 27, 2015, the entire disclosure of which is incorporated byreference herein.

In some embodiments, campus 102 includes energy generation 120. Energygeneration 120 may be configured to generate energy that can be used bybuildings 116, used by central plant 118, and/or provided to energy grid104. In some embodiments, energy generation 120 generates electricity.For example, energy generation 120 may include an electric power plant,a photovoltaic energy field, or other types of systems or devices thatgenerate electricity. The electricity generated by energy generation 120can be used internally by campus 102 (e.g., by buildings 116 and/orcampus 118) to decrease the amount of electric power that campus 102receives from outside sources such as energy grid 104 or battery 108. Ifthe amount of electricity generated by energy generation 120 exceeds theelectric power demand of campus 102, the excess electric power can beprovided to energy grid 104 or stored in battery 108. The power outputof campus 102 is shown in FIG. 1 as P_(campus). P_(campus) may bepositive if campus 102 is outputting electric power or negative ifcampus 102 is receiving electric power.

Still referring to FIG. 1, system 100 is shown to include a powerinverter 106 and a battery 108. Power inverter 106 may be configured toconvert electric power between direct current (DC) and alternatingcurrent (AC). For example, battery 108 may be configured to store andoutput DC power, whereas energy grid 104 and campus 102 may beconfigured to consume and generate AC power. Power inverter 106 may beused to convert DC power from battery 108 into a sinusoidal AC outputsynchronized to the grid frequency of energy grid 104. Power inverter106 may also be used to convert AC power from campus 102 or energy grid104 into DC power that can be stored in battery 108. The power output ofbattery 108 is shown as P_(bat). P_(bat) may be positive if battery 108is providing power to power inverter 106 or negative if battery 108 isreceiving power from power inverter 106.

In some instances, power inverter 106 receives a DC power output frombattery 108 and converts the DC power output to an AC power output thatcan be fed into energy grid 104. Power inverter 106 may synchronize thefrequency of the AC power output with that of energy grid 104 (e.g., 50Hz or 60 Hz) using a local oscillator and may limit the voltage of theAC power output to no higher than the grid voltage. In some embodiments,power inverter 106 is a resonant inverter that includes or uses LCcircuits to remove the harmonics from a simple square wave in order toachieve a sine wave matching the frequency of energy grid 104. Invarious embodiments, power inverter 106 may operate using high-frequencytransformers, low-frequency transformers, or without transformers.Low-frequency transformers may convert the DC output from battery 108directly to the AC output provided to energy grid 104. High-frequencytransformers may employ a multi-step process that involves convertingthe DC output to high-frequency AC, then back to DC, and then finally tothe AC output provided to energy grid 104.

System 100 is shown to include a point of interconnection (POI) 110. POI110 is the point at which campus 102, energy grid 104, and powerinverter 106 are electrically connected. The power supplied to POI 110from power inverter 106 is shown as P_(sup). P_(sup) may be defined asP_(bat)+P_(loss), where P_(batt) is the battery power and P_(loss) isthe power loss in the battery system (e.g., losses in power inverter 106and/or battery 108). P_(sup) may be positive is power inverter 106 isproviding power to POI 110 or negative if power inverter 106 isreceiving power from POI 110. P_(campus) and P_(sup) combine at POI 110to form P_(POI). P_(POI) may be defined as the power provided to energygrid 104 from POI 110. P_(POI) may be positive if POI 110 is providingpower to energy grid 104 or negative if POI 110 is receiving power fromenergy grid 104.

Still referring to FIG. 1, system 100 is shown to include a frequencyresponse controller 112. Controller 112 may be configured to generateand provide power setpoints to power inverter 106. Power inverter 106may use the power setpoints to control the amount of power P_(sup)provided to POI 110 or drawn from POI 110. For example, power inverter106 may be configured to draw power from POI 110 and store the power inbattery 108 in response to receiving a negative power setpoint fromcontroller 112. Conversely, power inverter 106 may be configured to drawpower from battery 108 and provide the power to POI 110 in response toreceiving a positive power setpoint from controller 112. The magnitudeof the power setpoint may define the amount of power P_(sup) provided toor from power inverter 106. Controller 112 may be configured to generateand provide power setpoints that optimize the value of operating system100 over a time horizon.

In some embodiments, frequency response controller 112 uses powerinverter 106 and battery 108 to perform frequency regulation for energygrid 104. Frequency regulation is the process of maintaining thestability of the grid frequency (e.g., 60 Hz in the United States). Thegrid frequency may remain stable and balanced as long as the totalelectric supply and demand of energy grid 104 are balanced. Anydeviation from that balance may result in a deviation of the gridfrequency from its desirable value. For example, an increase in demandmay cause the grid frequency to decrease, whereas an increase in supplymay cause the grid frequency to increase. Frequency response controller112 may be configured to offset a fluctuation in the grid frequency bycausing power inverter 106 to supply energy from battery 108 to energygrid 104 (e.g., to offset a decrease in grid frequency) or store energyfrom energy grid 104 in battery 108 (e.g., to offset an increase in gridfrequency).

In some embodiments, frequency response controller 112 uses powerinverter 106 and battery 108 to perform load shifting for campus 102.For example, controller 112 may cause power inverter 106 to store energyin battery 108 when energy prices are low and retrieve energy frombattery 108 when energy prices are high in order to reduce the cost ofelectricity required to power campus 102. Load shifting may also allowsystem 100 reduce the demand charge incurred. Demand charge is anadditional charge imposed by some utility providers based on the maximumpower consumption during an applicable demand charge period. Forexample, a demand charge rate may be specified in terms of dollars perunit of power (e.g., $/kW) and may be multiplied by the peak power usage(e.g., kW) during a demand charge period to calculate the demand charge.Load shifting may allow system 100 to smooth momentary spikes in theelectric demand of campus 102 by drawing energy from battery 108 inorder to reduce peak power draw from energy grid 104, thereby decreasingthe demand charge incurred.

Still referring to FIG. 1, system 100 is shown to include an incentiveprovider 114. Incentive provider 114 may be a utility (e.g., an electricutility), a regional transmission organization (RTO), an independentsystem operator (ISO), or any other entity that provides incentives forperforming frequency regulation. For example, incentive provider 114 mayprovide system 100 with monetary incentives for participating in afrequency response program. In order to participate in the frequencyresponse program, system 100 may maintain a reserve capacity of storedenergy (e.g., in battery 108) that can be provided to energy grid 104.System 100 may also maintain the capacity to draw energy from energygrid 104 and store the energy in battery 108. Reserving both of thesecapacities may be accomplished by managing the state of charge ofbattery 108.

Frequency response controller 112 may provide incentive provider 114with a price bid and a capability bid. The price bid may include a priceper unit power (e.g., $/MW) for reserving or storing power that allowssystem 100 to participate in a frequency response program offered byincentive provider 114. The price per unit power bid by frequencyresponse controller 112 is referred to herein as the “capability price.”The price bid may also include a price for actual performance, referredto herein as the “performance price.” The capability bid may define anamount of power (e.g., MW) that system 100 will reserve or store inbattery 108 to perform frequency response, referred to herein as the“capability bid.”

Incentive provider 114 may provide frequency response controller 112with a capability clearing price CP_(cap), a performance clearing priceCP_(perf), and a regulation award Reg_(award), which correspond to thecapability price, the performance price, and the capability bid,respectively. In some embodiments, CP_(cap), CP_(perf), and Reg_(award)are the same as the corresponding bids placed by controller 112. Inother embodiments, CP_(cap), CP_(perf), and Reg_(award) may not be thesame as the bids placed by controller 112. For example, CP_(cap),CP_(perf), and Reg_(award) may be generated by incentive provider 114based on bids received from multiple participants in the frequencyresponse program. Controller 112 may use CP_(cap), CP_(perf), andReg_(award) to perform frequency regulation, described in greater detailbelow.

Frequency response controller 112 is shown receiving a regulation signalfrom incentive provider 114. The regulation signal may specify a portionof the regulation award Reg_(award) that frequency response controller112 is to add or remove from energy grid 104. In some embodiments, theregulation signal is a normalized signal (e.g., between −1 and 1)specifying a proportion of Reg_(award). Positive values of theregulation signal may indicate an amount of power to add to energy grid104, whereas negative values of the regulation signal may indicate anamount of power to remove from energy grid 104.

Frequency response controller 112 may respond to the regulation signalby generating an optimal power setpoint for power inverter 106. Theoptimal power setpoint may take into account both the potential revenuefrom participating in the frequency response program and the costs ofparticipation. Costs of participation may include, for example, amonetized cost of battery degradation as well as the energy and demandcharges that will be incurred. The optimization may be performed usingsequential quadratic programming, dynamic programming, or any otheroptimization technique.

In some embodiments, controller 112 uses a battery life model toquantify and monetize battery degradation as a function of the powersetpoints provided to power inverter 106. Advantageously, the batterylife model allows controller 112 to perform an optimization that weighsthe revenue generation potential of participating in the frequencyresponse program against the cost of battery degradation and other costsof participation (e.g., less battery power available for campus 102,increased electricity costs, etc.). An exemplary regulation signal andpower response are described in greater detail with reference to FIG. 2.

Referring now to FIG. 2, a pair of frequency response graphs 200 and 250are shown, according to an exemplary embodiment. Graph 200 illustrates aregulation signal Reg_(signal) 202 as a function of time. Reg_(signal)202 is shown as a normalized signal ranging from −1 to 1 (i.e.,−1≦Reg_(signal)≦1). Reg_(signal) 202 may be generated by incentiveprovider 114 and provided to frequency response controller 112.Reg_(signal) 202 may define a proportion of the regulation awardReg_(award) 254 that controller 112 is to add or remove from energy grid104, relative to a baseline value referred to as the midpoint b 256. Forexample, if the value of Reg_(award) 254 is 10 MW, a regulation signalvalue of 0.5 (i.e., Reg_(signal)=0.5) may indicate that system 100 isrequested to add 5 MW of power at POI 110 relative to midpoint b (e.g.,P_(POI) ^(*)=10MW×0.5+b), whereas a regulation signal value of −0.3 mayindicate that system 100 is requested to remove 3 MW of power from POI110 relative to midpoint b (e.g., P_(POI) ^(*)=10MW×0.3+b).

Graph 250 illustrates the desired interconnection power P_(POI) ⁸ 252 asa function of time. P_(POI) ^(*) 252 may be calculated by frequencyresponse controller 112 based on Reg_(signal) 202, Reg_(award) 254, anda midpoint b 256. For example, controller 112 may calculate P_(POI) ^(*)252 using the following equation:

P _(POI) ^(*)=Reg_(award)×Reg_(signal) +b

where P_(POI) ^(*) represents the desired power at POI 110 (e.g.,P_(POI) ^(*)=P_(sup)+P_(campus)) and b is the midpoint. Midpoint b maybe defined (e.g., set or optimized) by controller 112 and may representthe midpoint of regulation around which the load is modified in responseto Reg_(signal) 202. Optimal adjustment of midpoint b may allowcontroller 112 to actively participate in the frequency response marketwhile also taking into account the energy and demand charge that will beincurred.

In order to participate in the frequency response market, controller 112may perform several tasks. Controller 112 may generate a price bid(e.g., S/MW) that includes the capability price and the performanceprice. In some embodiments, controller 112 sends the price bid toincentive provider 114 at approximately 15:30 each day and the price bidremains in effect for the entirety of the next day. Prior to beginning afrequency response period, controller 112 may generate the capabilitybid (e.g., MW) and send the capability bid to incentive provider 114. Insome embodiments, controller 112 generates and sends the capability bidto incentive provider 114 approximately 1.5 hours before a frequencyresponse period begins. In an exemplary embodiment, each frequencyresponse period has a duration of one hour; however, it is contemplatedthat frequency response periods may have any duration.

At the start of each frequency response period, controller 112 maygenerate the midpoint b around which controller 112 plans to performfrequency regulation. In some embodiments, controller 112 generates amidpoint b that will maintain battery 108 at a constant state of charge(SOC) (i.e. a midpoint that will result in battery 108 having the sameSOC at the beginning and end of the frequency response period). In otherembodiments, controller 112 generates midpoint b using an optimizationprocedure that allows the SOC of battery 108 to have different values atthe beginning and end of the frequency response period. For example,controller 112 may use the SOC of battery 108 as a constrained variablethat depends on midpoint b in order to optimize a value function thattakes into account frequency response revenue, energy costs, and thecost of battery degradation. Exemplary processes for calculating and/oroptimizing midpoint b under both the constant SOC scenario and thevariable SOC scenario are described in greater detail with reference toFIGS. 3-4.

During each frequency response period, controller 112 may periodicallygenerate a power setpoint for power inverter 106. For example,controller 112 may generate a power setpoint for each time step in thefrequency response period. In some embodiments, controller 112 generatesthe power setpoints using the equation:

P _(POI) ^(*)=Reg_(award)×Reg_(signal) +b

where P_(POI) ^(*)=P_(sup)+P_(campus) Positive values of P_(POI) ^(*)indicate energy flow from POI 110 to energy grid 104. Positive values ofP_(sup) and P_(campus) indicate energy flow to POI 110 from powerinverter 106 and campus 102, respectively. In other embodiments,controller 112 generates the power setpoints using the equation:

P _(POI) ^(*)=Reg_(award)×Res_(FR) +b

where Res_(FR) is an optimal frequency response generated by optimizinga value function (described in greater detail below). Controller 112 maysubtract P campus from P_(POI) ^(*) to generate the power setpoint forpower inverter 106 (i.e., P_(sup)=P_(POI) ^(*)−P_(campus)) The powersetpoint for power inverter 106 indicates the amount of power that powerinverter 106 is to add to POI 110 (if the power setpoint is positive) orremove from POI 110 (if the power setpoint is negative).

Frequency Response Controller

Referring now to FIG. 3, a block diagram illustrating frequency responsecontroller 112 in greater detail is shown, according to an exemplaryembodiment. Frequency response controller 112 may be configured toperform an optimization process to generate values for the bid price,the capability bid, and the midpoint b. In some embodiments, frequencyresponse controller 112 generates values for the bids and the midpoint bperiodically using a predictive optimization scheme (e.g., once everyhalf hour, once per frequency response period, etc.). Controller 112 mayalso calculate and update power setpoints for power inverter 106periodically during each frequency response period (e.g., once every twoseconds).

In some embodiments, the interval at which controller 112 generatespower setpoints for power inverter 106 is significantly shorter than theinterval at which controller 112 generates the bids and the midpoint b.For example, controller 112 may generate values for the bids and themidpoint b every half hour, whereas controller 112 may generate a powersetpoint for power inverter 106 every two seconds. The difference inthese time scales allows controller 112 to use a cascaded optimizationprocess to generate optimal bids, midpoints b, and power setpoints.

In the cascaded optimization process, a high level controller 312determines optimal values for the bid price, the capability bid, and themidpoint b by performing a high level optimization. High levelcontroller 312 may select midpoint b to maintain a constant state ofcharge in battery 108 (i.e., the same state of charge at the beginningand end of each frequency response period) or to vary the state ofcharge in order to optimize the overall value of operating system 100(e.g., frequency response revenue minus energy costs and batterydegradation costs). High level controller 312 may also determine filterparameters for a signal filter (e.g., a low pass filter) used by a lowlevel controller 314.

Low level controller 314 uses the midpoint b and the filter parametersfrom high level controller 312 to perform a low level optimization inorder to generate the power setpoints for power inverter 106.Advantageously, low level controller 314 may determine how closely totrack the desired power P_(POI) ^(*) at the point of interconnection110. For example, the low level optimization performed by low levelcontroller 314 may consider not only frequency response revenue but alsothe costs of the power setpoints in terms of energy costs and batterydegradation. In some instances, low level controller 314 may determinethat it is deleterious to battery 108 to follow the regulation exactlyand may sacrifice a portion of the frequency response revenue in orderto preserve the life of battery 108. The cascaded optimization processis described in greater detail below.

Still referring to FIG. 3, frequency response controller 112 is shown toinclude a communications interface 302 and a processing circuit 304.Communications interface 302 may include wired or wireless interfaces(e.g., jacks, antennas, transmitters, receivers, transceivers, wireterminals, etc.) for conducting data communications with varioussystems, devices, or networks. For example, communications interface 302may include an Ethernet card and port for sending and receiving data viaan Ethernet-based communications network and/or a WiFi transceiver forcommunicating via a wireless communications network. Communicationsinterface 302 may be configured to communicate via local area networksor wide area networks (e.g., the Internet, a building WAN, etc.) and mayuse a variety of communications protocols (e.g., BACnet, IP, LON, etc.).

Communications interface 302 may be a network interface configured tofacilitate electronic data communications between frequency responsecontroller 112 and various external systems or devices (e.g., campus102, energy grid 104, power inverter 106, incentive provider 114,utilities 320, weather service 322, etc.). For example, frequencyresponse controller 112 may receive inputs from incentive provider 114indicating an incentive event history (e.g., past clearing prices,mileage ratios, participation requirements, etc.) and a regulationsignal. Controller 112 may receive a campus power signal from campus102, utility rates from utilities 320, and weather forecasts fromweather service 322 via communications interface 302. Controller 112 mayprovide a price bid and a capability bid to incentive provider 114 andmay provide power setpoints to power inverter 106 via communicationsinterface 302.

Still referring to FIG. 3, processing circuit 304 is shown to include aprocessor 306 and memory 308. Processor 306 may be a general purpose orspecific purpose processor, an application specific integrated circuit(ASIC), one or more field programmable gate arrays (FPGAs), a group ofprocessing components, or other suitable processing components.Processor 306 may be configured to execute computer code or instructionsstored in memory 308 or received from other computer readable media(e.g., CDROM, network storage, a remote server, etc.).

Memory 308 may include one or more devices (e.g., memory units, memorydevices, storage devices, etc.) for storing data and/or computer codefor completing and/or facilitating the various processes described inthe present disclosure. Memory 308 may include random access memory(RAM), read-only memory (ROM), hard drive storage, temporary storage,non-volatile memory, flash memory, optical memory, or any other suitablememory for storing software objects and/or computer instructions. Memory308 may include database components, object code components, scriptcomponents, or any other type of information structure for supportingthe various activities and information structures described in thepresent disclosure. Memory 308 may be communicably connected toprocessor 306 via processing circuit 304 and may include computer codefor executing (e.g., by processor 306) one or more processes describedherein.

Still referring to FIG. 3, frequency response controller 112 is shown toinclude a load/rate predictor 310. Load/rate predictor 310 may beconfigured to predict the electric load of campus 102 (i.e., {circumflexover (P)}_(campus)) for each time step k (e.g., k=1 . . . n) within anoptimization window. Load/rate predictor 310 is shown receiving weatherforecasts from a weather service 322. In some embodiments, load/ratepredictor 310 predicts {circumflex over (P)}_(campus) as a function ofthe weather forecasts. In some embodiments, load/rate predictor 310 usesfeedback from campus 102 to predict {circumflex over (P)}_(campus).Feedback from campus 102 may include various types of sensory inputs(e.g., temperature, flow, humidity, enthalpy, etc.) or other datarelating to buildings 116, central plant 118, and/or energy generation120 (e.g., inputs from a HVAC system, a lighting control system, asecurity system, a water system, a PV energy system, etc.). Load/ratepredictor 310 may predict one or more different types of loads forcampus 102. For example, load/rate predictor 310 may predict a hot waterload, a cold water load, and/or an electric load for each time step kwithin the optimization window.

In some embodiments, load/rate predictor 310 receives a measuredelectric load and/or previous measured load data from campus 102. Forexample, load/rate predictor 310 is shown receiving a campus powersignal from campus 102. The campus power signal may indicate themeasured electric load of campus 102. Load/rate predictor 310 maypredict one or more statistics of the campus power signal including, forexample, a mean campus power μ_(campus) and a standard deviation of thecampus power σ_(campus). Load/rate predictor 310 may predict P as afunction of a given weather forecast ({circumflex over (φ)}_(w)), a daytype (clay), the time of day (t), and previous measured load data(Y_(k−1)). Such a relationship is expressed in the following equation:

P _(campus) =f({circumflex over (φ)}_(w),day,t|Y _(k−1))

In some embodiments, load/rate predictor 310 uses a deterministic plusstochastic model trained from historical load data to predict{circumflex over (P)}_(campus). Load/rate predictor 310 may use any of avariety of prediction methods to predict {circumflex over (P)}_(campus)(e.g., linear regression for the deterministic portion and an AR modelfor the stochastic portion). In some embodiments, load/rate predictor310 makes load/rate predictions using the techniques described in U.S.patent application Ser. No. 14/717,593, titled “Building ManagementSystem for Forecasting Time Series Values of Building Variables” andfiled May 20, 2015.

Load/rate predictor 310 is shown receiving utility rates from utilities320. Utility rates may indicate a cost or price per unit of a resource(e.g., electricity, natural gas, water, etc.) provided by utilities 320at each time step k in the optimization window. In some embodiments, theutility rates are time-variable rates. For example, the price ofelectricity may be higher at certain times of day or days of the week(e.g., during high demand periods) and lower at other times of day ordays of the week (e.g., during low demand periods). The utility ratesmay define various time periods and a cost per unit of a resource duringeach time period. Utility rates may be actual rates received fromutilities 320 or predicted utility rates estimated by load/ratepredictor 310.

In some embodiments, the utility rates include demand charges for one ormore resources provided by utilities 320. A demand charge may define aseparate cost imposed by utilities 320 based on the maximum usage of aparticular resource (e.g., maximum energy consumption) during a demandcharge period. The utility rates may define various demand chargeperiods and one or more demand charges associated with each demandcharge period. In some instances, demand charge periods may overlappartially or completely with each other and/or with the predictionwindow. Advantageously, frequency response controller 112 may beconfigured to account for demand charges in the high level optimizationprocess performed by high level controller 312. Utilities 320 may bedefined by time-variable (e.g., hourly) prices, a maximum service level(e.g., a maximum rate of consumption allowed by the physicalinfrastructure or by contract) and, in the case of electricity, a demandcharge or a charge for the peak rate of consumption within a certainperiod. Load/rate predictor 310 may store the predicted campus power{circumflex over (P)}_(campus) and the utility rates in memory 308and/or provide the predicted campus power {circumflex over (P)}_(campus)and the utility rates to high level controller 312.

Still referring to FIG. 3, frequency response controller 112 is shown toinclude an energy market predictor 316 and a signal statistics predictor318. Energy market predictor 316 may be configured to predict energymarket statistics relating to the frequency response program. Forexample, energy market predictor 316 may predict the values of one ormore variables that can be used to estimate frequency response revenue.In some embodiments, the frequency response revenue is defined by thefollowing equation:

Rev=PS(CP_(cap)+MR·CP_(perf))Reg_(award)

where Rev is the frequency response revenue, CP_(cap) is the capabilityclearing price, MR is the mileage ratio, and CP_(perf) is theperformance clearing price. PS is a performance score based on howclosely the frequency response provided by controller 112 tracks theregulation signal. Energy market predictor 316 may be configured topredict the capability clearing price CP_(cap), the performance clearingprice CP_(perf), the mileage ratio MR, and/or other energy marketstatistics that can be used to estimate frequency response revenue.Energy market predictor 316 may store the energy market statistics inmemory 308 and/or provide the energy market statistics to high levelcontroller 312.

Signal statistics predictor 318 may be configured to predict one or morestatistics of the regulation signal provided by incentive provider 114.For example, signal statistics predictor 318 may be configured topredict the mean μ_(FR), standard deviation σ_(FR), and/or otherstatistics of the regulation signal. The regulation signal statisticsmay be based on previous values of the regulation signal (e.g., ahistorical mean, a historical standard deviation, etc.) or predictedvalues of the regulation signal (e.g., a predicted mean, a predictedstandard deviation, etc.).

In some embodiments, signal statistics predictor 318 uses adeterministic plus stochastic model trained from historical regulationsignal data to predict future values of the regulation signal. Forexample, signal statistics predictor 318 may use linear regression topredict a deterministic portion of the regulation signal and an AR modelto predict a stochastic portion of the regulation signal. In someembodiments, signal statistics predictor 318 predicts the regulationsignal using the techniques described in U.S. patent application Ser.No. 14/717,593, titled “Building Management System for Forecasting TimeSeries Values of Building Variables” and filed May 20, 2015. Signalstatistics predictor 318 may use the predicted values of the regulationsignal to calculate the regulation signal statistics. Signal statisticspredictor 318 may store the regulation signal statistics in memory 308and/or provide the regulation signal statistics to high level controller312.

Still referring to FIG. 3, frequency response controller 112 is shown toinclude a high level controller 312. High level controller 312 may beconfigured to generate values for the midpoint b and the capability bidReg_(award). In some embodiments, high level controller 312 determines amidpoint b that will cause battery 108 to have the same state of charge(SOC) at the beginning and end of each frequency response period. Inother embodiments, high level controller 312 performs an optimizationprocess to generate midpoint b and Reg_(award). For example, high levelcontroller 312 may generate midpoint b using an optimization procedurethat allows the SOC of battery 108 to vary and/or have different valuesat the beginning and end of the frequency response period. High levelcontroller 312 may use the SOC of battery 108 as a constrained variablethat depends on midpoint b in order to optimize a value function thattakes into account frequency response revenue, energy costs, and thecost of battery degradation. Both of these embodiments are described ingreater detail with reference to FIG. 4.

High level controller 312 may determine midpoint b by equating thedesired power P_(POI) ^(*) at POI 110 with the actual power at POI 110as shown in the following equation:

(Reg_(signal))(Reg_(award))+b=P _(bat) +P _(loss) +P _(campus)

where the left side of the equation (Reg_(signal))(Reg_(award))+b is thedesired power P_(POI) ^(*) at POI and the right side of the equation isthe actual power at POI 110. Integrating over the frequency responseperiod results in the following equation:

${\int\limits_{period}{\left( {{\left( {Reg}_{signal} \right)\left( {Reg}_{award} \right)} + b} \right){t}}} = {\int\limits_{period}{\left( {P_{bat} + P_{loss} + P_{campus}} \right){t}}}$

For embodiments in which the SOC of battery 108 is maintained at thesame value at the beginning and end of the frequency response period,the integral of the battery power P_(bat) over the frequency responseperiod is zero (i.e., ∫P_(bat)dt=0). Accordingly, the previous equationcan be rewritten as follows:

$b = {{\int\limits_{period}{P_{loss}{t}}} + {\int\limits_{period}{P_{campus}{t}}} - {{Reg}_{award}{\int\limits_{period}{{Reg}_{signal}{t}}}}}$

where the term ∫P_(bat)dt has been omitted because ∫P_(bat)dt=0. This isideal behavior if the only goal is to maximize frequency responserevenue. Keeping the SOC of battery 108 at a constant value (and near50%) will allow system 100 to participate in the frequency market duringall hours of the day.

High level controller 312 may use the estimated values of the campuspower signal received from campus 102 to predict the value of∫P_(campus)dt over the frequency response period. Similarly, high levelcontroller 312 may use the estimated values of the regulation signalfrom incentive provider 114 to predict the value of ∫Reg_(signal)dt overthe frequency response period. High level controller 312 may estimatethe value of ∫P_(loss)dt using a Thevinin equivalent circuit model ofbattery 108 (described in greater detail with reference to FIG. 4). Thisallows high level controller 312 to estimate the integral ∫P_(loss)dt asa function of other variables such as Reg_(award), Reg_(signal),P_(campus), and midpoint b.

After substituting known and estimated values, the preceding equationcan be rewritten as follows:

$\frac{1}{4P_{\max}}{\quad\left\lbrack {{E\left\{ P_{campus}^{2} \right\}} + {\quad{{{Reg}_{award}^{2}E\left\{ {Reg}_{signal}^{2} \right\}} - {\quad{{\left. \quad{2{Reg}_{award}E\left\{ {Reg}_{signal} \right\} E\left\{ P_{campus} \right\}} \right\rbrack {\Delta t}} + {\quad{{\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack {\Delta t}} + {\quad{{{{\frac{b}{2P_{\max}}\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack}{\Delta t}} + {b\Delta t} + {\frac{b_{2}}{4P_{\max}}{\Delta t}}} = 0}}}}}}}}} \right.}$

where the notation E{ } indicates that the variable within the brackets{ } is ergodic and can be approximated by the estimated mean of thevariable. For example, the term E{Reg_(signal)} can be approximated bythe estimated mean of the regulation signal μ_(FR) and the termE{P_(campus)} can be approximated by the estimated mean of the campuspower signal μ_(campus). High level controller 312 may solve theequation for midpoint b to determine the midpoint b that maintainsbattery 108 at a constant state of charge.

For embodiments in which the SOC of battery 108 is treated as avariable, the SOC of battery 108 may be allowed to have different valuesat the beginning and end of the frequency response period. Accordingly,the integral of the battery power P_(bat) over the frequency responseperiod can be expressed as −ΔSOC·C_(des) as shown in the followingequation:

${\int\limits_{period}{P_{bat}{t}}} = {{- {\Delta {SOC}}} \cdot C_{des}}$

where ΔSOC is the change in the SOC of battery 108 over the frequencyresponse period and C_(des) is the design capacity of battery 108. TheSOC of battery 108 may be a normalized variable (i.e., 0≦SOC≦1) suchthat the term SOC·C_(des) represents the amount of energy stored inbattery 108 for a given state of charge. The SOC is shown as a negativevalue because drawing energy from battery 108 (i.e., a positive P_(bat))decreases the SOC of battery 108. The equation for midpoint b becomes:

$b = {{\int\limits_{period}{P_{loss}{t}}} + {\int\limits_{period}{P_{campus}{t}}} + {\int\limits_{period}{P_{bat}{t}}} - {{Reg}_{award}{\int\limits_{period}{{Reg}_{signal}{t}}}}}$

After substituting known and estimated values, the preceding equationcan be rewritten as follows:

${{\frac{1}{4P_{\max}}\left\lbrack {{E\left\{ P_{campus}^{2} \right\}} + {{Reg}_{award}^{2}E\left\{ {Reg}_{signal}^{2} \right\}} - {2{Reg}_{award}E\left\{ {Reg}_{signal} \right\} E\left\{ P_{campus} \right\}}} \right\rbrack}{\Delta t}} + {\quad{{{\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} + {E\left\{ P_{campus} \right\}}} \right\rbrack {\Delta t}} + {{\Delta {SOC}} \cdot C_{des}} + {{\frac{b}{2P_{\max}}\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack}{\Delta t}} + {b\Delta t} + {\frac{b_{2}}{4P_{\max}}{\Delta t}}} = 0}}$

High level controller 312 may solve the equation for midpoint b in termsof ΔSOC

High level controller 312 may perform an optimization to find optimalmidpoints b for each frequency response period within an optimizationwindow (e.g., each hour for the next day) given the electrical costsover the optimization window. Optimal midpoints b may be the midpointsthat maximize an objective function that includes both frequencyresponse revenue and costs of electricity and battery degradation. Forexample, an objective function J can be written as:

$J = {{\sum\limits_{k = 1}^{h}\; {{Rev}\left( {Reg}_{{award},k} \right)}} + {\sum\limits_{k = 1}^{h}{c_{k}b_{k}}} + {\min\limits_{period}\left( {P_{{campus},k} + b_{k}} \right)} - {\sum\limits_{k = 1}^{h}\lambda_{{bat},k}}}$

where Rev(Reg_(award,k)) is the frequency response revenue at time stepk, c_(k)b_(k) is the cost of electricity purchased at time step k, themin( ) term is the demand charge based on the maximum rate ofelectricity consumption during the applicable demand charge period, andλ_(bat,k) is the monetized cost battery degradation at time step k. Theelectricity cost is expressed as a positive value because drawing powerfrom energy grid 104 is represented as a negative number and thereforewill result in negative value (i.e., a cost) in the objective function.The demand charge is expressed as a minimum for the same reason (i.e.,the most negative power value represents maximum power draw from energygrid 104).

High level controller 312 may estimate the frequency response revenueRev(Reg_(award,k)) as a function of the midpoints b. In someembodiments, high level controller 312 estimates frequency responserevenue using the following equation:

Rev(Reg_(award))=Reg_(award)(CP_(cap)+MR·CP_(perf))

where CP_(cap), MR, and CP_(perf) are the energy market statisticsreceived from energy market predictor 316 and Reg_(award) is a functionof the midpoint b. For example, high level controller 312 may place abid that is as large as possible for a given midpoint, as shown in thefollowing equation:

Reg_(award) =P _(limit) −|b|

where P_(limit) is the power rating of power inverter 106.Advantageously, selecting Reg_(award) as a function of midpoint b allowshigh level controller 312 to predict the frequency response revenue thatwill result from a given midpoint b.

High level controller 312 may estimate the cost of battery degradationλ_(bat) as a function of the midpoints b. For example, high levelcontroller 312 may use a battery life model to predict a loss in batterycapacity that will result from a set of midpoints b, power outputs,and/or other variables that can be manipulated by controller 112. Insome embodiments, the battery life model expresses the loss in batterycapacity C_(loss,add) as a sum of multiple piecewise linear functions,as shown in the following equation:

C _(loss,add) =f ₁(T _(cell))+f ₂(SOC)+f ₃(DOD)+f ₄(PR)+f ₅(ER)−C_(loss,nom)

where T_(eell) is the cell temperature, SOC is the state of charge, DODis the depth of discharge, PR is the average power ratio

$\left( {{e.g.},{{PR} = {{avg}\left( \frac{P}{P_{des}} \right)}}} \right),$

and ER is the average effort ratio

$\left( {{e.g.},{{ER} = {{avg}\left( \frac{\Delta P}{P_{des}} \right)}}} \right.$

of battery 108. Each of these terms is described in greater detail withreference to FIG. 4. Advantageously, several of the terms in the batterylife model depend on the midpoints b and power setpoints selected bycontroller 112. This allows high level controller 312 to predict a lossin battery capacity that will result from a given set of controloutputs. High level controller 312 may monetize the loss in batterycapacity and include the monetized cost of battery degradation λ_(bat)in the objective function J.

In some embodiments, high level controller 312 generates a set of filterparameters for low level controller 314. The filter parameters may beused by low level controller 314 as part of a low-pass filter thatremoves high frequency components from the regulation signal. In someembodiments, high level controller 312 generates a set of filterparameters that transform the regulation signal into an optimalfrequency response signal Res_(FR). For example, high level controller312 may perform a second optimization process to determine an optimalfrequency response Res_(FR) based on the optimized values forReg_(award) and midpoint b.

In some embodiments, high level controller 312 determines the optimalfrequency response Res_(FR) by optimizing value function J with thefrequency response revenue Rev(Reg_(award)) defined as follows:

Rev(Reg_(award))=PS·Reg_(award)(CP_(cap)+MR·CP_(perf))

and with the frequency response Res_(FR) substituted for the regulationsignal in the battery life model. The performance score PS may be basedon several factors that indicate how well the optimal frequency responseRes_(FR) tracks the regulation signal. Closely tracking the regulationsignal may result in higher performance scores, thereby increasing thefrequency response revenue. However, closely tracking the regulationsignal may also increase the cost of battery degradation λ_(bat). Theoptimized frequency response Res_(FR) represents an optimal tradeoffbetween decreased frequency response revenue and increased battery life.High level controller 312 may use the optimized frequency responseRes_(FR) to generate a set of filter parameters for low level controller314. These and other features of high level controller 312 are describedin greater detail with reference to FIG. 4.

Still referring to FIG. 3, frequency response controller 112 is shown toinclude a low level controller 314. Low level controller 314 is shownreceiving the midpoints b and the filter parameters from high levelcontroller 312. Low level controller 314 may also receive the campuspower signal from campus 102 and the regulation signal from incentiveprovider 114. Low level controller 314 may use the regulation signal topredict future values of the regulation signal and may filter thepredicted regulation signal using the filter parameters provided by highlevel controller 312.

Low level controller 314 may use the filtered regulation signal todetermine optimal power setpoints for power inverter 106. For example,low level controller 314 may use the filtered regulation signal tocalculate the desired interconnection power P_(POI) ^(*) using thefollowing equation:

P _(POI) ^(*)=Reg_(award)·Reg_(filter) +b

where Reg_(filter) is the filtered regulation signal. Low levelcontroller 314 may subtract the campus power P_(campus) from the desiredinterconnection power P_(POI) ^(*) to calculate the optimal powersetpoints P_(SP) for power inverter 106, as shown in the followingequation:

P _(SP) =P _(POI) ^(*) −P _(campus)

In some embodiments, low level controller 314 performs an optimizationto determine how closely to track P_(POI) ^(*). For example, low levelcontroller 314 may determine an optimal frequency response Res_(FR) byoptimizing value function J with the frequency response revenueRev(Reg_(award)) defined as follows:

Rev(Reg_(award)=PS·Reg_(award)(CP_(cap)+MR·CP_(perf))

and with the frequency response Res_(FR) substituted for the regulationsignal in the battery life model. Low level controller 314 may use theoptimal frequency response Res_(FR) in place of the filtered frequencyresponse Reg_(filter) to calculate the desired interconnection powerP_(POI) ^(*) and power setpoints P_(SP) as previously described. Theseand other features of low level controller 314 are described in greaterdetail with reference to FIG. 5.

High Level Controller

Referring now to FIG. 4, a block diagram illustrating high levelcontroller 312 in greater detail is shown, according to an exemplaryembodiment. High level controller 312 is shown to include a constantstate of charge (SOC) controller 402 and a variable SOC controller 408.Constant SOC controller 402 may be configured to generate a midpoint bthat results in battery 108 having the same SOC at the beginning and theend of each frequency response period. In other words, constant SOCcontroller 408 may determine a midpoint b that maintains battery 108 ata predetermined SOC at the beginning of each frequency response period.Variable SOC controller 408 may generate midpoint b using anoptimization procedure that allows the SOC of battery 108 to havedifferent values at the beginning and end of the frequency responseperiod. In other words, variable SOC controller 408 may determine amidpoint b that results in a net change in the SOC of battery 108 overthe duration of the frequency response period.

Constant State of Charge Controller

Constant SOC controller 402 may determine midpoint b by equating thedesired power P_(POI) ^(*) at POI 110 with the actual power at POI 110as shown in the following equation:

(Reg_(signal))(Reg_(award))+b=P _(bad) +P _(loss) +P _(campus)

where the left side of the equation (Reg_(signal))(Reg_(award))+b is thedesired power P_(POI) ^(*) at POI 110 and the right side of the equationis the actual power at POI 110. Integrating over the frequency responseperiod results in the following equation:

${\int\limits_{period}{\left( {{\left( {Reg}_{signal} \right)\left( {Reg}_{award} \right)} + b} \right){t}}} = {\int\limits_{period}{\left( {P_{bat} + P_{loss} + P_{campus}} \right){t}}}$

Since the SOC of battery 108 is maintained at the same value at thebeginning and end of the frequency response period, the integral of thebattery power P_(bat) over the frequency response period is zero (i.e.,∫P_(bat)dt=0). Accordingly, the previous equation can be rewritten asfollows:

$b = {{\int\limits_{period}{P_{loss}{t}}} + {\int\limits_{period}{P_{campus}{t}}} - {{Reg}_{award}{\int\limits_{period}{{Reg}_{signal}{t}}}}}$

where the term ∫P_(bat)dt has been omitted because ∫P_(bat)dt=0. This isideal behavior if the only goal is to maximize frequency responserevenue. Keeping the SOC of battery 108 at a constant value (and near50%) will allow system 100 to participate in the frequency market duringall hours of the day.

Constant SOC controller 402 may use the estimated values of the campuspower signal received from campus 102 to predict the value of∫P_(campus)dt over the frequency response period. Similarly, constantSOC controller 402 may use the estimated values of the regulation signalfrom incentive provider 114 to predict the value of ∫Reg_(signal)dt overthe frequency response period. Reg_(award) can be expressed as afunction of midpoint b as previously described (e.g.,Reg_(award)=P_(limit)−|b|). Therefore, the only remaining term in theequation for midpoint b is the expected battery power loss ∫P_(loss).

Constant SOC controller 402 is shown to include a battery power lossestimator 404. Battery power loss estimator 404 may estimate the valueof ∫P_(loss)dt using a Thevinin equivalent circuit model of battery 108.For example, battery power loss estimator 404 may model battery 108 as avoltage source in series with a resistor. The voltage source has an opencircuit voltage of V_(OC) and the resistor has a resistance of R_(TH).An electric current I flows from the voltage source through theresistor.

To find the battery power loss in terms of the supplied power P_(sup),battery power loss estimator 404 may identify the supplied power P_(sup)as a function of the current I, the open circuit voltage V_(OC), and theresistance R_(TH) as shown in the following equation:

P _(sup) =V _(OC) I−I ² R _(TH)

which can be rewritten as:

${\frac{I^{2}}{I_{SC}} - I + \frac{P^{\prime}}{4}} = 0$

with the following substitutions:

${I_{SC} = \frac{V_{OC}}{R_{TH}}},\mspace{14mu} {P^{\prime} = \frac{P}{P_{\max}}},\mspace{14mu} {P_{\max} = \frac{V_{OC}^{2}}{4\; R_{TH}}}$

where P is the supplied power and P_(max) is the maximum possible powertransfer.

Battery power loss estimator 404 may solve for the current I as follows:

$I = {\frac{I_{SC}}{2}\left( {1 - \sqrt{1 - P^{\prime}}} \right)}$

which can be converted into an expression for power loss P_(loss) interms of the supplied power P and the maximum possible power transferP_(max) as shown in the following equation:

P _(loss) =P _(max)(1−√{square root over (1−P′)})²

Battery power loss estimator 404 may simplify the previous equation byapproximating the expression (1−√{square root over (1−P′)}) as a linearfunction about P′=0. This results in the following approximation forP_(loss):

$P_{loss} \approx {P_{\max}\left( \frac{P^{\prime}}{2} \right)}^{2}$

which is a good approximation for powers up to one-fifth of the maximumpower.

Battery power loss estimator 404 may calculate the expected value of∫P_(loss)dt over the frequency response period as follows:

${\int_{period}{P_{loss}\ {t}}} = {{\int_{period}{{- {P_{\max}\left( \frac{{{Reg}_{award}{Reg}_{signal}} + b - P_{campus}}{2\; P_{\max}} \right)}^{2}}\ {t}}} = {{{\frac{1}{4\; P_{\max}}\left\lbrack {{2\; {Reg}_{award}{\int_{period}{P_{campus}{Reg}_{signal}\ {t}}}} - {\int_{period}{P_{campus}^{2}\ {t}}} - {{Reg}_{award}^{2}{\int_{period}{{Reg}_{signal}^{2}\ {t}}}}} \right\rbrack} + {\frac{b}{2\; P_{\max}}\left\lbrack {{\int_{period}{P_{campus}^{2}\ {t}}} - {{Reg}_{award}{\int_{period}{{Reg}_{signal}\ {t}}}}} \right\rbrack} - {\frac{b^{2}}{4\; P_{\max}}\Delta \; t}} = {{{\frac{1}{4\; P_{\max}}\left\lbrack {{E\left\{ P_{campus}^{2} \right\}} + {{Reg}_{award}^{2}E\left\{ {Reg}_{signal}^{2} \right\}} - {2\; {Reg}_{award}E\left\{ {Reg}_{signal} \right\} E\left\{ P_{campus} \right\}}} \right\rbrack}\Delta \; t} - {{\frac{b}{2\; P_{\max}}\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack}\Delta \; t} - {\frac{b^{2}}{4\; P_{\max}}\Delta \; t}}}}$

where the notation E{ } indicates that the variable within the brackets{ } is ergodic and can be approximated by the estimated mean of thevariable. This formulation allows battery power loss estimator 404 toestimate ∫P_(loss)dt as a function of other variables such asReg_(award), Reg_(signal), P_(campus), midpoint b, and P_(max).

Constant SOC controller 402 is shown to include a midpoint calculator406. Midpoint calculator 406 may be configured to calculate midpoint bby substituting the previous expression for ∫P_(loss)dt into theequation for midpoint b. After substituting known and estimated values,the equation for midpoint b can be rewritten as follows:

${{{\frac{1}{4\; P_{\max}}\left\lbrack {{E\left\{ P_{campus}^{2} \right\}} + {{Reg}_{award}^{2}E\left\{ {Reg}_{signal}^{2} \right\}} - {2\; {Reg}_{award}E\left\{ {Reg}_{signal} \right\} E\left\{ P_{campus} \right\}}} \right\rbrack}\Delta \; t} + {\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack \Delta \; t} + {{\frac{b}{2\; P_{\max}}\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack}\Delta \; t} + {b\; \Delta \; t} + {\frac{b^{2}}{4\; P_{\max}}\Delta \; t}} = 0$

Midpoint calculator 406 may solve the equation for midpoint b todetermine the midpoint b that maintains battery 108 at a constant stateof charge.

Variable State of Charge Controller

Variable SOC controller 408 may determine optimal midpoints b byallowing the SOC of battery 108 to have different values at thebeginning and end of a frequency response period. For embodiments inwhich the SOC of battery 108 is allowed to vary, the integral of thebattery power P_(bat) over the frequency response period can beexpressed as −ΔSOC·C_(des) as shown in the following equation:

∫_(period)P_(bat) t = −Δ SOC ⋅ C_(des)

where ΔSOC is the change in the SOC of battery 108 over the frequencyresponse period and C_(des) is the design capacity of battery 108. TheSOC of battery 108 may be a normalized variable (i.e., 0≦SOC≦1) suchthat the term SOC·C_(des) represents the amount of energy stored inbattery 108 for a given state of charge. The SOC is shown as a negativevalue because drawing energy from battery 108 (i.e., a positive P_(bat))decreases the SOC of battery 108. The equation for midpoint b becomes:

b = ∫_(period)P_(loss) t + ∫_(period)P_(campus) t + ∫_(period)P_(bat) t − Reg_(award)∫_(period)Reg_(signal) t

Variable SOC controller 408 is shown to include a battery power lossestimator 410 and a midpoint optimizer 412. Battery power loss estimator410 may be the same or similar to battery power loss estimator 404.Midpoint optimizer 412 may be configured to establish a relationshipbetween the midpoint b and the SOC of battery 108. For example, aftersubstituting known and estimated values, the equation for midpoint b canbe written as follows:

${{{\frac{1}{4\; P_{\max}}\left\lbrack {{E\left\{ P_{campus}^{2} \right\}} + {Reg}_{award}^{2} + {E\left\{ {Reg}_{signal}^{2} \right\}} - {2\; {Reg}_{award}E\left\{ {Reg}_{signal} \right\} E\left\{ P_{campus} \right\}}} \right\rbrack}\Delta \; t} + {\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} + {E\left\{ P_{campus} \right\}}} \right\rbrack \Delta \; t} + {\Delta \; {{SOC} \cdot C_{des}}} + {{\frac{b}{2\; P_{\max}}\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack}\Delta \; t} + {b\; \Delta \; t} + {\frac{b^{2}}{4\; P_{\max}}\Delta \; t}} = 0$

Advantageously, the previous equation defines a relationship betweenmidpoint b and the change in SOC of battery 108. Midpoint optimizer 412may use this equation to determine the impact that different values ofmidpoint b have on the SOC in order to determine optimal midpoints b.This equation can also be used by midpoint optimizer 412 duringoptimization to translate constraints on the SOC in terms of midpoint b.For example, the SOC of battery 108 may be constrained between zero and1 (e.g., 0≦SOC≦1) since battery 108 cannot be charged in excess of itsmaximum capacity or depleted below zero. Midpoint optimizer 412 may usethe relationship between ΔSOC and midpoint b to constrain theoptimization of midpoint b to midpoint values that satisfy the capacityconstraint.

Midpoint optimizer 412 may perform an optimization to find optimalmidpoints b for each frequency response period within the optimizationwindow (e.g., each hour for the next day) given the electrical costsover the optimization window. Optimal midpoints b may be the midpointsthat maximize an objective function that includes both frequencyresponse revenue and costs of electricity and battery degradation. Forexample, an objective function J can be written as:

$J = {{\sum\limits_{k = 1}^{h}\; {{Rev}\left( {Reg}_{{award},k} \right)}} + {\sum\limits_{k = 1}^{h}\; {c_{k}b_{k}}} + {\min\limits_{period}\left( {P_{{campus},k} + b_{k}} \right)} - {\sum\limits_{k = 1}^{h}\; \lambda_{{bat},k}}}$

where Rev(Reg_(award,k)) is the frequency response revenue at time stepk, c_(k)b_(k) is the cost of electricity purchased at time step k, themin( ) term is the demand charge based on the maximum rate ofelectricity consumption during the applicable demand charge period, andλ_(bat,k) is the monetized cost battery degradation at time step k.Midpoint optimizer 412 may use input from frequency response revenueestimator 416 (e.g., a revenue model) to determine a relationshipbetween midpoint b and Rev(Reg_(award,k)) Similarly, midpoint optimizer412 may use input from battery degradation estimator 418 and/or revenueloss estimator 420 to determine a relationship between midpoint b andthe monetized cost of battery degradation λ_(bat,k).

Still referring to FIG. 4, variable SOC controller 408 is shown toinclude an optimization constraints module 414. Optimization constraintsmodule 414 may provide one or more constraints on the optimizationperformed by midpoint optimizer 412. The optimization constraints may bespecified in terms of midpoint b or other variables that are related tomidpoint b. For example, optimization constraints module 414 mayimplement an optimization constraint specifying that the expected SOC ofbattery 108 at the end of each frequency response period is between zeroand one, as shown in the following equation:

${0 \leq {{SOC}_{0} + {\sum\limits_{i = 1}^{j}\; {\Delta \; {SOC}_{i}}}} \leq {1\mspace{14mu} {\forall\mspace{14mu} j}}} = {1\mspace{14mu} \ldots \mspace{14mu} h}$

where SOC₀ is the SOC of battery 108 at the beginning of theoptimization window, ΔSOC_(i) is the change in SOC during frequencyresponse period i, and h is the total number of frequency responseperiods within the optimization window.

In some embodiments, optimization constraints module 414 implements anoptimization constraint on midpoint b so that the power at POI 110 doesnot exceed the power rating of power inverter 106. Such a constraint isshown in the following equation:

−P _(limit) ≦b _(k) +P _(campus,max) ^((ρ)) ≦P _(limit)

where P_(limit) is the power rating of power inverter 106 andP_(campus,max) ^((ρ)) is the maximum value of P_(campus) at confidencelevel ρ. This constraint could also be implemented by identifying theprobability that the sum of b_(k) and P_(campus,max) exceeds the powerinverter power rating (e.g., using a probability density function forP_(campus,max)) and limiting that probability to less than or equal to1−ρ.

In some embodiments, optimization constraints module 414 implements anoptimization constraint to ensure (with a given probability) that theactual SOC of battery 108 remains between zero and one at each time stepduring the applicable frequency response period. This constraint isdifferent from the first optimization constraint which placed bounds onthe expected SOC of battery 108 at the end of each optimization period.The expected SOC of battery 108 can be determined deterministically,whereas the actual SOC of battery 108 is dependent on the campus powerP_(campus) and the actual value of the regulation signal Reg_(signal) ateach time step during the optimization period. In other words, for anyvalue of Reg_(award)>0, there is a chance that battery 108 becomes fullydepleted or fully charged while maintaining the desired power P_(POI)^(*) at POI 110.

Optimization constraints module 414 may implement the constraint on theactual SOC of battery 108 by approximating the battery power P_(bat) (arandom process) as a wide-sense stationary, correlated normallydistributed process. Thus, the SOC of battery 108 can be considered as arandom walk. Determining if the SOC would violate the constraint is anexample of a gambler's ruin problem. For example, consider a random walkdescribed by the following equation:

y _(k+1) =y _(k) +x _(k) ,P(x _(k)=1)=ρ,P(x _(k)=−1)=1−p

The probability P that y_(k) (starting at state z) will reach zero inless than n moves is given by the following equation:

$P = {2\; {{a^{- 1}\left( {2\; p} \right)}^{\frac{n - z}{2}}\left\lbrack {2\left( {1 - p} \right)} \right\rbrack}^{\frac{n + z}{2}}{\sum\limits_{v = 1}^{\frac{a}{2}}\; {{\cos^{n - 1}\left( \frac{\pi \; v}{a} \right)}{\sin \left( \frac{\pi \; v}{a} \right)}{\sin \left( \frac{\pi \; {zv}}{a} \right)}}}}$

In some embodiments, each frequency response period includesapproximately n=1800 time steps (e.g., one time step every two secondsfor an hour). Therefore, the central limit theorem applies and it ispossible to convert the autocorrelated random process for P_(bat) andthe limits on the SOC of battery 108 into an uncorrelated random processof 1 or −1 with a limit of zero.

In some embodiments, optimization constraints module 414 converts thebattery power P_(bat) into an uncorrelated normal process driven by theregulation signal Reg_(signal). For example, consider the originalbattery power described by the following equation:

x _(k+1) =αx _(k) +e _(k) ,x _(k) ˜N(μ,σ),e _(k) ˜N(μ_(e),σ_(e))

where the signal x represents the battery power P_(bat), α is anautocorrelation parameter, and e is a driving signal. In someembodiments, e represents the regulation signal Reg_(signal). If thepower of the signal x is known, then the power of signal e is alsoknown, as shown in the following equations:

μ(1−α)=μ_(e)

E{x _(k) ²}(1−α)²−2αμμ_(e) =E{e _(k) ²}

E{x _(k) ²}(1−α²)−2μ²α(1−α)=E{e _(k) ²},

Additionally, the impulse response of the difference equation forx_(k+1) is:

h _(k)=α^(k) k≧0

Using convolution, x_(k) can be expressed as follows:

$x_{k} = {\sum\limits_{i = 1}^{k}\; {\alpha^{k - i}e_{i - 1}}}$x₃ = α²e₀ + α¹e₁ + e₂x_(q) = α^(q − 1)e₀ + α^(q − 2)e₁ + … + α e_(q − 2) + e_(q − 1)

A random walk driven by signal x_(k) can be defined as follows:

$y_{k} = {{\sum\limits_{j = 1}^{k}\; x_{j}} = {\sum\limits_{j = 1}^{k}\; {\sum\limits_{i = 1}^{j}\; {\alpha^{j - 1}e_{i - 1}}}}}$

which for large values of j can be approximated using the infinite sumof a geometric series in terms of the uncorrelated signal e rather thanx:

$y_{k} = {{{\sum\limits_{j = 1}^{k}\; x_{j}} \approx {\sum\limits_{j = 1}^{k}\; {\frac{1}{1 - \alpha}e_{j}}}} = {{\sum\limits_{j = 1}^{k}\; {x_{j}^{\prime}\mspace{14mu} k}}1}}$

Thus, the autocorrelated driving signal x_(k) of the random walk can beconverted into an uncorrelated driving signal x_(k)′ with mean and powergiven by:

${{E\left\{ x_{k}^{\prime} \right\}} = \mu},\mspace{14mu} {{E\left\{ \left( {x_{k}^{\prime} - \mu} \right)^{2} \right\}} = {\frac{1 + \alpha}{1 - \alpha}\sigma^{2}}},\mspace{14mu} {{E\left\{ x_{k}^{\prime 2} \right\}} = {{\frac{1 + \alpha}{1 - \alpha}\sigma^{2}} + \mu^{2}}},{\sigma_{x^{\prime}}^{2} = {\frac{1 + \alpha}{1 - \alpha}\sigma^{2}}}$

where x_(k)′ represents the regulation signal Reg_(signal).Advantageously, this allows optimization constraints module 414 todefine the probability of ruin in terms of the regulation signalReg_(signal).

In some embodiments, optimization constraints module 414 determines aprobability p that the random walk driven by the sequence of −1 and 1will take the value of 1. In order to ensure that the random walk drivenby the sequence of −1 and 1 will behave the same as the random walkdriven by x_(k)′, optimization constraints module 414 may select p suchthat the ratio of the mean to the standard deviation is the same forboth driving functions, as shown in the following equations:

$\frac{mean}{stdev} = {\frac{\mu}{\sqrt{\frac{1 + \alpha}{1 - \alpha}\sigma}} = {\overset{\sim}{\mu} = \frac{{2\; p} - 1}{\sqrt{4\; {p\left( {1 - p} \right)}}}}}$$p = {\frac{1}{2} \pm {\frac{1}{2}\sqrt{1 - \left( \frac{1}{{\overset{\sim}{\mu}}^{2} + 1} \right)}}}$

where {tilde over (μ)} is the ratio of the mean to the standarddeviation of the driving signal (e.g., Reg_(signal)) and μ is the changein state-of-charge over the frequency response period divided by thenumber of time steps within the frequency response period (i.e.,

$\left. {\mu = \frac{\Delta \; {SOC}}{n}} \right).$

For embodiments in which each frequency response period has a durationof one hour (i.e., 3600 seconds) and the interval between time steps istwo seconds, the number of time steps per frequency response period is1800 (i.e., n=1800). In the equation for ρ, the plus is used when {tildeover (μ)} is greater than zero, whereas the minus is used when {tildeover (μ)} is less than zero. Optimization constraints module 414 mayalso ensure that both driving functions have the same number of standarddeviations away from zero (or ruin) to ensure that both random walkshave the same behavior, as shown in the following equation:

$z = \frac{{{SOC} \cdot C_{des}}\sqrt{4\; {p\left( {1 - p} \right)}}}{\sqrt{\frac{1 + \alpha}{1 - \alpha}\sigma}}$

Advantageously, the equations for ρ and z allow optimization constraintsmodule 414 to define the probability of ruin P (i.e., the probability ofbattery 108 fully depleting or reaching a fully charged state) within Ntime steps (n=1 . . . N) as a function of variables that are known tohigh level controller 312 and/or manipulated by high level controller312. For example, the equation for ρ defines ρ as a function of the meanand standard deviation of the regulation signal Reg_(signal), which maybe estimated by signal statistics predictor 318. The equation for zdefines z as a function of the SOC of battery 108 and the parameters ofthe regulation signal Reg_(signal).

Optimization constraints module 414 may use one or more of the previousequations to place constraints on ΔSOC·C_(des) and Reg_(award) given thecurrent SOC of battery 108. For example, optimization constraints module414 may use the mean and standard deviation of the regulation signalReg_(signal) to calculate ρ. Optimization constraints module 414 maythen use p in combination with the SOC of battery 108 to calculate z.Optimization constraints module 414 may use p and z as inputs to theequation for the probability of ruin P. This allows optimizationconstraints module 414 to define the probability or ruin P as a functionof the SOC of battery 108 and the estimated statistics of the regulationsignal Reg_(signal). Optimization constraints module 414 may imposeconstraints on the SOC of battery 108 to ensure that the probability ofruin P within N time steps does not exceed a threshold value. Theseconstraints may be expressed as limitations on the variablesΔSOC·C_(des) and/or Reg_(award), which are related to midpoint b aspreviously described.

In some embodiments, optimization constraints module 414 uses theequation for the probability of ruin P to define boundaries on thecombination of variables ρ and z. The boundaries represent thresholdswhen the probability of ruin P in less than N steps is greater than acritical value P_(cr) (e.g., P_(cr)=0.001). For example, optimizationconstraints module 414 may generate boundaries that correspond to athreshold probability of battery 108 fully depleting or reaching a fullycharged state during a frequency response period (e.g., in N=1800steps).

In some embodiments, optimization constraints module 414 constrains theprobability of ruin P to less than the threshold value, which imposeslimits on potential combinations of the variables ρ and z. Since thevariables ρ and z are related to the SOC of battery 108 and thestatistics of the regulation signal, the constraints may imposelimitations on ΔSOC·C_(des) and Reg_(award) given the current SOC ofbattery 108. These constraints may also impose limitations on midpoint bsince the variables ΔSOC·C_(des) and Reg_(award) are related to midpointb. For example, optimization constraints module 414 may set constraintson the maximum bid Reg_(award) given a desired change in the SOC forbattery 108. In other embodiments, optimization constraints module 414penalizes the objective function J given the bid Reg_(award) and thechange in SOC.

Still referring to FIG. 4, variable SOC controller 408 is shown toinclude a frequency response (FR) revenue estimator 416. FR revenueestimator 416 may be configured to estimate the frequency responserevenue that will result from a given midpoint b (e.g., a midpointprovided by midpoint optimizer 412). The estimated frequency responserevenue may be used as the term Rev(Reg_(award,k)) in the objectivefunction J. Midpoint optimizer 412 may use the estimated frequencyresponse revenue along with other terms in the objective function J todetermine an optimal midpoint b.

In some embodiments, FR revenue estimator 416 uses a revenue model topredict frequency response revenue. An exemplary revenue model which maybe used by FR revenue estimator 416 is shown in the following equation:

Rev(Reg_(award))=Reg_(award)(CP_(cap)+MR·CP_(perf))

where CP_(cap), MR, and CP_(perf) are the energy market statisticsreceived from energy market predictor 316 and Reg_(award) is a functionof the midpoint b. For example, capability bid calculator 422 maycalculate Reg_(award) using the following equation:

Reg_(award) =P _(limit) −|b|

where P_(limit) is the power rating of power inverter 106.

As shown above, the equation for frequency response revenue used by FRrevenue estimator 416 does not include a performance score (or assumes aperformance score of 1.0). This results in FR revenue estimator 416estimating a maximum possible frequency response revenue that can beachieved for a given midpoint b (i.e., if the actual frequency responseof controller 112 were to follow the regulation signal exactly).However, it is contemplated that the actual frequency response may beadjusted by low level controller 314 in order to preserve the life ofbattery 108. When the actual frequency response differs from theregulation signal, the equation for frequency response revenue can beadjusted to include a performance score. The resulting value function Jmay then be optimized by low level controller 314 to determine anoptimal frequency response output which considers both frequencyresponse revenue and the costs of battery degradation, as described withreference to FIG. 5.

Still referring to FIG. 4, variable SOC controller 408 is shown toinclude a battery degradation estimator 418. Battery degradationestimator 418 may estimate the cost of battery degradation that willresult from a given midpoint b (e.g., a midpoint provided by midpointoptimizer 412). The estimated battery degradation may be used as theterm λ_(bat) in the objective function J. Midpoint optimizer 412 may usethe estimated battery degradation along with other terms in theobjective function J to determine an optimal midpoint b.

In some embodiments, battery degradation estimator 418 uses a batterylife model to predict a loss in battery capacity that will result from aset of midpoints b, power outputs, and/or other variables that can bemanipulated by controller 112. The battery life model may define theloss in battery capacity C_(loss,add) as a sum of multiple piecewiselinear functions, as shown in the following equation:

C _(loss,add) =f ₁(T _(cell))+f ₂(SOC)+f ₃(DOD)+f ₄(PR)+f ₅(ER)−C_(loss,nom)

where T_(cell) is the cell temperature, SOC is the state of charge, DODis the depth of discharge, PR is the average power ratio (e.g.,

$\left. {{PR} = {{avg}\left( \frac{P_{avg}}{P_{des}} \right)}} \right),$

and ER is the average effort ratio (e.g.,

${ER} = {{avg}\left( \frac{\Delta \; P_{bat}}{P_{des}} \right)}$

of battery 108. C_(loss,nom) is the nominal loss in battery capacitythat is expected to occur over time. Therefore, C_(loss,add) representsthe additional loss in battery capacity degradation in excess of thenominal value C_(loss,nom).

Battery degradation estimator 418 may define the terms in the batterylife model as functions of one or more variables that have known values(e.g., estimated or measured values) and/or variables that can bemanipulated by high level controller 312. For example, batterydegradation estimator 418 may define the terms in the battery life modelas functions of the regulation signal statistics (e.g., the mean andstandard deviation of Reg_(signal)), the campus power signal statistics(e.g., the mean and standard deviation of P_(campus)), Reg_(award),midpoint b, the SOC of battery 108, and/or other variables that haveknown or controlled values.

In some embodiments, battery degradation estimator 418 measures the celltemperature T_(cell) using a temperature sensor configured to measurethe temperature of battery 108. In other embodiments, batterydegradation estimator 418 estimates or predicts the cell temperatureT_(cell) based on a history of measured temperature values. For example,battery degradation estimator 418 may use a predictive model to estimatethe cell temperature T_(cell) as a function of the battery powerP_(bat), the ambient temperature, and/or other variables that can bemeasured, estimated, or controlled by high level controller 312.

Battery degradation estimator 418 may define the variable SOC in thebattery life model as the SOC of battery 108 at the end of the frequencyresponse period. The SOC of battery 108 may be measured or estimatedbased on the control decisions made by controller 112. For example,battery degradation estimator 418 may use a predictive model to estimateor predict the SOC of battery 108 at the end of the frequency responseperiod as a function of the battery power P_(bat), the midpoint b,and/or other variables that can be measured, estimated, or controlled byhigh level controller 312.

Battery degradation estimator 418 may define the average power ratio PRas the ratio of the average power output of battery 108 (i.e., P_(avg))to the design power P_(des) (e.g.,

$\left. {{PR} = \frac{P_{avg}}{P_{des}}} \right).$

The average power output of battery 108 can be defined using thefollowing equation:

P _(avg) =E{|Reg_(award)Reg_(signal) +b−P _(loss) −P _(campus)|}

where the expression (Reg_(award)Reg_(signal)+b−P_(loss)−P_(campus))represents the battery power P_(bat). The expected value of P_(avg) isgiven by:

$P_{avg} = {{\sigma_{bat}\sqrt{\frac{2}{\pi}}{\exp \left( \frac{- \mu_{bat}^{2}}{2\sigma_{bat}^{2}} \right)}} + {{erf}\left( \frac{- \mu_{bat}}{\sqrt{2\sigma_{bat}^{2}}} \right)}}$

where μ_(bat) and σ_(bat) ² are the mean and variance of the batterypower P_(bat). The variables μ_(bat) and σ_(bat) ² may be defined asfollows:

μ_(bat)=Reg_(award) E{Reg_(signal) }+b−E{P _(loss) }−E{P _(campus)}

σ_(bat) ²=Reg_(award) ²σ_(FR) ²+σ_(campus) ²

where σ_(FR) ² is the variance of Reg_(signal) and the contribution ofthe battery power loss to the variance σ_(bat) ² is neglected.

Battery degradation estimator 418 may define the average effort ratio ERas the ratio of the average change in battery power ΔP_(avg) to thedesign power P_(des) (i.e.,

$\left. {{ER} = \frac{\Delta \; P_{avg}}{P_{des}}} \right).$

The average change in battery power can be defined using the followingequation:

ΔP _(avg) =E{P _(bat,k) −P _(bat,k−1)}

ΔP _(avg) =E{|Reg_(award)(Reg_(signal,k)−Reg_(signal,k−1))−(P _(loss,k)−P _(loss,k−1))−(P _(campus,k) −P _(campus,k−1))|}

To make this calculation more tractable, the contribution due to thebattery power loss can be neglected. Additionally, the campus powerP_(campus) and the regulation signal Reg_(signal) can be assumed to beuncorrelated, but autocorrelated with first order autocorrelationparameters of α_(campus) and α, respectively. The argument inside theabsolute value in the equation for ΔP_(avg) has a mean of zero and avariance given by:

$\begin{matrix}{\sigma_{diff}^{2} = {E\left\{ \left\lbrack {{{Reg}_{award}\left( {{Reg}_{{signal},k} - {Reg}_{{signal},{k - 1}}} \right)} - \left( {P_{{campus},k} - P_{{campus},{k - 1}}} \right)} \right\rbrack^{2} \right\}}} \\{= {E\left\{ {{{Reg}_{award}^{2}\left( {{Reg}_{{signal},k} - {Reg}_{{signal},{k - 1}}} \right)}^{2} - \left( {P_{{campus},k} - P_{{campus},{k - 1}}} \right)^{2}} \right\}}} \\{= {{2\; {{Reg}_{award}^{2}\left( {1 - \alpha} \right)}\sigma_{FR}^{2}} + {2\left( {1 - \alpha_{campus}} \right)\sigma_{campus}^{2}}}}\end{matrix}$

Battery degradation estimator 418 may define the depth of discharge DODas the maximum state of charge minus the minimum state of charge ofbattery 108 over the frequency response period, as shown in thefollowing equation:

DOD=SOC_(max)−SOC_(min)

The SOC of battery 108 can be viewed as a constant slope with a zeromean random walk added to it, as previously described. An uncorrelatednormal random walk with a driving signal that has zero mean has anexpected range given by:

${E\left\{ {\max - \min} \right\}} = {2\sigma \sqrt{\frac{2\; N}{\pi}}}$

where E{max−min} represent the depth of discharge DOD and can beadjusted for the autocorrelation of the driving signal as follows:

${E\left\{ {\max - \min} \right\}} = {2\sigma_{bat}\sqrt{\frac{1 + \alpha_{bat}}{1 - \alpha_{bat}}}\sqrt{\frac{2\; N}{\pi}}}$σ_(bat)² = Reg_(award)²σ_(FR)² + σ_(campus)²$\alpha_{bat} = \frac{{{Reg}_{award}^{2}{\alpha\sigma}_{FR}^{2}} + {\alpha_{campus}\sigma_{campus}^{2}}}{{{Reg}_{award}^{2}\sigma_{FR}^{2}} + \sigma_{campus}^{2}}$

If the SOC of battery 108 is expected to change (i.e., is not zeromean), the following equation may be used to define the depth ofdischarge:

${E\left\{ {\max - \min} \right\}} = \left\{ \begin{matrix}{R_{0} + {{c \cdot \Delta}\; {{SOC} \cdot \exp}\left\{ {{- \alpha}\frac{R_{0} - {\Delta \; {SOC}}}{\sigma_{bat}}} \right\}}} & {{\Delta \; {SOC}} < R_{0}} \\{{\Delta \; {SOC}} + {{c \cdot R_{0} \cdot \exp}\left\{ {{- \alpha}\frac{{\Delta \; {SOC}} - R_{0}}{\sigma_{bat}}} \right\}}} & {{\Delta \; {SOC}} > R_{0}}\end{matrix} \right.$

where R₀ is the expected range with zero expected change in the state ofcharge. Battery degradation estimator 418 may use the previous equationsto establish a relationship between the capacity loss C_(loss,add) andthe control outputs provided by controller 112.

Still referring to FIG. 4, variable SOC controller 408 is shown toinclude a revenue loss estimator 420. Revenue loss estimator 420 may beconfigured to estimate an amount of potential revenue that will be lostas a result of the battery capacity loss C_(loss,add). In someembodiments, revenue loss estimator 420 converts battery capacity lossC_(loss,add) into lost revenue using the following equation:

R _(loss)=(CP_(cap)+MR·CP_(perf))C _(loss,add) P _(des)

where R_(loss) is the lost revenue over the duration of the frequencyresponse period.

Revenue loss estimator 420 may determine a present value of the revenueloss R_(loss) using the following equation:

$\lambda_{bat} = {\left\lbrack \frac{1 - \left( {1 + \frac{i}{n}} \right)^{- n}}{\frac{i}{n}} \right\rbrack R_{loss}}$

where n is the total number of frequency response periods (e.g., hours)during which the revenue loss occurs and λ_(bat) is the present value ofthe revenue loss during the ith frequency response period. In someembodiments, the revenue loss occurs over ten years (e.g., n=87,600hours). Revenue loss estimator 420 may provide the present value of therevenue loss λ_(bat) to midpoint optimizer 412 for use in the objectivefunction J.

Midpoint optimizer 412 may use the inputs from optimization constraintsmodule 414, FR revenue estimator 416, battery degradation estimator 418,and revenue loss estimator 420 to define the terms in objective functionJ. Midpoint optimizer 412 may determine values for midpoint b thatoptimize objective function J. In various embodiments, midpointoptimizer 412 may use sequential quadratic programming, dynamicprogramming, or any other optimization technique.

Still referring to FIG. 4, high level controller 312 is shown to includea capability bid calculator 422. Capability bid calculator 422 may beconfigured to generate a capability bid Reg_(award) based on themidpoint b generated by constant SOC controller 402 and/or variable SOCcontroller 408. In some embodiments, capability bid calculator 422generates a capability bid that is as large as possible for a givenmidpoint, as shown in the following equation:

Reg_(award) =P _(limit) −|b|

where P_(limit) is the power rating of power inverter 106. Capabilitybid calculator 422 may provide the capability bid to incentive provider114 and to frequency response optimizer 424 for use in generating anoptimal frequency response.

Filter Parameters Optimization

Still referring to FIG. 4, high level controller 312 is shown to includea frequency response optimizer 424 and a filter parameters optimizer426. Filter parameters optimizer 426 may be configured to generate a setof filter parameters for low level controller 314. The filter parametersmay be used by low level controller 314 as part of a low-pass filterthat removes high frequency components from the regulation signalReg_(signal). In some embodiments, filter parameters optimizer 426generates a set of filter parameters that transform the regulationsignal Reg_(signal) into an optimal frequency response signal Res_(FR).Frequency response optimizer 424 may perform a second optimizationprocess to determine the optimal frequency response Res_(FR) based onthe values for Reg_(award) and midpoint b. In the second optimization,the values for Reg_(award) and midpoint b may be fixed at the valuespreviously determined during the first optimization.

In some embodiments, frequency response optimizer 424 determines theoptimal frequency response Res_(FR) by optimizing value function J shownin the following equation:

$J = {{\sum\limits_{k = 1}^{h}\; {{Rev}\left( {Reg}_{{award},k} \right)}} + {\sum\limits_{k = 1}^{h}\; {c_{k}b_{k}}} + {\min\limits_{period}\left( {P_{{campus},k} + b_{k}} \right)} - {\sum\limits_{k = 1}^{h}\; \lambda_{{bat},k}}}$

where the frequency response revenue Rev(Reg_(award)) is defined asfollows:

Rev(Reg_(award))=PS·Reg_(award)(CP_(cap)+MR·CP_(perf))

and the frequency response Res_(FR) is substituted for the regulationsignal Reg_(signal) in the battery life model used to calculateλ_(bat,k). The performance score PS may be based on several factors thatindicate how well the optimal frequency response Res_(FR) tracks theregulation signal Reg_(signal).

The frequency response Res_(FR) may affect both Rev(Reg_(award)) and themonetized cost of battery degradation λ_(bat). Closely tracking theregulation signal may result in higher performance scores, therebyincreasing the frequency response revenue. However, closely tracking theregulation signal may also increase the cost of battery degradationλ_(bat). The optimized frequency response Res_(FR) represents an optimaltradeoff between decreased frequency response revenue and increasedbattery life (i.e., the frequency response that maximizes value J).

In some embodiments, the performance score PS is a composite weightingof an accuracy score, a delay score, and a precision score. Frequencyresponse optimizer 424 may calculate the performance score PS using theperformance score model shown in the following equation:

PS=⅓PS_(acc)+⅓PS_(delay)+⅓PS_(prec)

where PS_(acc) is the accuracy score, PS_(delay) is the delay score, andPS_(prec) is the precision score. In some embodiments, each term in theprecision score is assigned an equal weighting (e.g., ⅓). In otherembodiments, some terms may be weighted higher than others.

The accuracy score PS_(acc) may be the maximum correlation between theregulation signal Reg_(signal) and the optimal frequency responseRes_(FR). Frequency response optimizer 424 may calculate the accuracyscore PS_(acc) using the following equation:

${PS}_{acc} = {\max\limits_{\delta}r_{{Reg},{{Res}{(\delta)}}}}$

where δ is a time delay between zero and δ_(max) (e.g., between zero andfive minutes).

The delay score PS_(delay) may be based on the time delay 6 between theregulation signal Reg_(signal) and the optimal frequency responseRes_(FR). Frequency response optimizer 424 may calculate the delay scorePS_(delay) using the following equation:

${PS}_{delay} = {\frac{{\delta \lbrack s\rbrack} - \delta_{\max}}{\delta_{\max}}}$

where δ[s] is the time delay of the frequency response Res_(FR) relativeto the regulation signal Reg_(signal) and δ_(max) is the maximumallowable delay (e.g., 5 minutes or 300 seconds).

The precision score PS_(prec) may be based on a difference between thefrequency response Res_(FR) and the regulation signal Reg_(signal).Frequency response optimizer 424 may calculate the precision scorePS_(prec) using the following equation:

${PS}_{prec} = {1 - \frac{\sum{{{Res}_{FR} - {Reg}_{signal}}}}{\sum{{Reg}_{signal}}}}$

Frequency response optimizer 424 may use the estimated performance scoreand the estimated battery degradation to define the terms in objectivefunction J. Frequency response optimizer 424 may determine values forfrequency response Res_(FR) that optimize objective function J. Invarious embodiments, frequency response optimizer 424 may use sequentialquadratic programming, dynamic programming, or any other optimizationtechnique.

Filter parameters optimizer 426 may use the optimized frequency responseRes_(FR) to generate a set of filter parameters for low level controller314. In some embodiments, the filter parameters are used by low levelcontroller 314 to translate an incoming regulation signal into afrequency response signal. Low level controller 314 is described ingreater detail with reference to FIG. 5.

Still referring to FIG. 4, high level controller 312 is shown to includea data fusion module 428. Data fusion module 428 is configured toaggregate data received from external systems and devices for processingby high level controller 312. For example, data fusion module 428 maystore and aggregate external data such as the campus power signal,utility rates, incentive event history and/or weather forecasts as shownin FIG. 17. Further, data fusion module 428 may store and aggregate datafrom low level controller 314. For example, data fusion module 428 mayreceive data such as battery SOC, battery temperature, battery systemtemperature data, security device status data, battery voltage data,battery current data and/or any other data provided by battery system1604. Data fusion module 428 is described in greater detail withreference to FIG. 17.

Low Level Controller

Referring now to FIG. 5, a block diagram illustrating low levelcontroller 314 in greater detail is shown, according to an exemplaryembodiment. Low level controller 314 may receive the midpoints b and thefilter parameters from high level controller 312. Low level controller314 may also receive the campus power signal from campus 102 and theregulation signal Reg_(signal) and the regulation award Reg_(award) fromincentive provider 114. Low level controller 314 may be configured topredict and filter the regulation signal Reg_(signal), estimatefrequency response revenue, estimate battery degradation, and determineoptimal battery power setpoints. These features are described briefly inthe following paragraphs and in greater detail with reference to FIGS.8-10.

Predicting and Filtering the Regulation Signal

Low level controller 314 is shown to include a regulation signalpredictor 502. Regulation signal predictor 502 may use a history of pastand current values for the regulation signal Reg_(signal) to predictfuture values of the regulation signal. In some embodiments, regulationsignal predictor 502 uses a deterministic plus stochastic model trainedfrom historical regulation signal data to predict future values of theregulation signal Reg_(signal.) For example, regulation signal predictor502 may use linear regression to predict a deterministic portion of theregulation signal Reg_(signal) and an AR model to predict a stochasticportion of the regulation signal Reg_(signal). In some embodiments,regulation signal predictor 502 predicts the regulation signalReg_(signal) using the techniques described in U.S. patent applicationSer. No. 14/717,593, titled “Building Management System for ForecastingTime Series Values of Building Variables” and filed May 20, 2015.

Low level controller 314 is shown to include a regulation signal filter504. Regulation signal filter 504 may filter the incoming regulationsignal Reg_(signal) and/or the predicted regulation signal using thefilter parameters provided by high level controller 312. In someembodiments, regulation signal filter 504 is a low pass filterconfigured to remove high frequency components from the regulationsignal Reg_(signal). Regulation signal filter 504 may provide thefiltered regulation signal to power setpoint optimizer 506.

Determining Optimal Power Setpoints

Power setpoint optimizer 506 may be configured to determine optimalpower setpoints for power inverter 106 based on the filtered regulationsignal. In some embodiments, power setpoint optimizer 506 uses thefiltered regulation signal as the optimal frequency response. Forexample, low level controller 314 may use the filtered regulation signalto calculate the desired interconnection power P_(POI) ^(*) using thefollowing equation:

P _(POI) ^(*)=Reg_(award)·Reg_(filter) +b

where Reg_(filter) is the filtered regulation signal. Power setpointoptimizer 506 may subtract the campus power P_(campus) from the desiredinterconnection power P_(POI) ^(*) to calculate the optimal powersetpoints P_(SP) for power inverter 106, as shown in the followingequation:

P _(SP) =P _(POI) ^(*) −P _(campus)

In other embodiments, low level controller 314 performs an optimizationto determine how closely to track P_(POI) ^(*). For example, low levelcontroller 314 is shown to include a frequency response optimizer 508.Frequency response optimizer 508 may determine an optimal frequencyresponse Res_(FR) by optimizing value function J shown in the followingequation:

$J = {{\sum\limits_{k = 1}^{h}{{Rev}\left( {Reg}_{{award},k} \right)}} + {\sum\limits_{k = 1}^{h}{c_{k}b_{k}}} + {\min\limits_{period}\left( {P_{{campus},k} + b_{k}} \right)} - {\sum\limits_{k = 1}^{h}\lambda_{{bat},k}}}$

where the frequency response Res_(FR) affects both Rev(Reg_(award)) andthe monetized cost of battery degradation λ_(bat). The frequencyresponse Res_(FR) may affect both Rev(Reg_(award)) and the monetizedcost of battery degradation λ_(bat). The optimized frequency responseRes_(FR) represents an optimal tradeoff between decreased frequencyresponse revenue and increased battery life (i.e., the frequencyresponse that maximizes value J). The values of Rev(Reg_(award)) andλ_(bat,k) may be calculated by FR revenue estimator 510, performancescore calculator 512, battery degradation estimator 514, and revenueloss estimator 516.

Estimating Frequency Response Revenue

Still referring to FIG. 5, low level controller 314 is shown to includea FR revenue estimator 510. FR revenue estimator 510 may estimate afrequency response revenue that will result from the frequency responseRes_(FR). In some embodiments, FR revenue estimator 510 estimates thefrequency response revenue using the following equation:

Rev(Reg_(award))=PS·Reg_(award)(CP_(cap)+MR·CP_(perf))

where Reg_(award), CP_(cap), MR, and CP_(perf) are provided as knowninputs and PS is the performance score.

Low level controller 314 is shown to include a performance scorecalculator 512. Performance score calculator 512 may calculate theperformance score PS used in the revenue function. The performance scorePS may be based on several factors that indicate how well the optimalfrequency response Res_(FR) tracks the regulation signal Reg_(signal) Insome embodiments, the performance score PS is a composite weighting ofan accuracy score, a delay score, and a precision score. Performancescore calculator 512 may calculate the performance score PS using theperformance score model shown in the following equation:

PS=⅓PS_(acc)+⅓PS_(delay)+⅓PS_(prec)

where PS_(acc) is the accuracy score, PS_(delay) is the delay score, andPS_(prec) is the precision score. In some embodiments, each term in theprecision score is assigned an equal weighting (e.g., ⅓). In otherembodiments, some terms may be weighted higher than others. Each of theterms in the performance score model may be calculated as previouslydescribed with reference to FIG. 4.

Estimating Battery Degradation

Still referring to FIG. 5, low level controller 314 is shown to includea battery degradation estimator 514. Battery degradation estimator 514may be the same or similar to battery degradation estimator 418, withthe exception that battery degradation estimator 514 predicts thebattery degradation that will result from the frequency responseRes_(FR) rather than the original regulation signal Reg_(signal). Theestimated battery degradation may be used as the term λ_(batt) in theobjective function J. Frequency response optimizer 508 may use theestimated battery degradation along with other terms in the objectivefunction J to determine an optimal frequency response Res_(FR).

In some embodiments, battery degradation estimator 514 uses a batterylife model to predict a loss in battery capacity that will result fromthe frequency response Res_(FR). The battery life model may define theloss in battery capacity C_(loss,add) as a sum of multiple piecewiselinear functions, as shown in the following equation:

C _(loss,add) =f ₁(T _(cell))+f ₂(SOC)+f ₃(DOD)+f ₄(PR)+f ₅(ER)−C_(loss,nom)

where T_(cell) is the cell temperature, SOC is the state of charge, DODis the depth of discharge, PR is the average power ratio

$\left( {{e.g.},{{PR} = {{avg}\left( \frac{P_{avg}}{P_{des}} \right)}}} \right),$

and ER is the average effort ratio

$\left( {{e.g.},{{ER} = {{avg}\left( \frac{\Delta \; P_{bat}}{P_{des}} \right)}}} \right.$

of battery 108. C_(loss,nom) is the nominal loss in battery capacitythat is expected to occur over time. Therefore, C_(loss,add) representsthe additional loss in battery capacity degradation in excess of thenominal value C_(loss,nom). The terms in the battery life model may becalculated as described with reference to FIG. 4, with the exceptionthat the frequency response Res_(FR) is used in place of the regulationsignal Reg_(signal).

Still referring to FIG. 5, low level controller 314 is shown to includea revenue loss estimator 516. Revenue loss estimator 516 may be the sameor similar to revenue loss estimator 420, as described with reference toFIG. 4. For example, revenue loss estimator 516 may be configured toestimate an amount of potential revenue that will be lost as a result ofthe battery capacity loss C_(loss,add). In some embodiments, revenueloss estimator 516 converts battery capacity loss C_(loss,add) into lostrevenue using the following equation:

R _(loss)=(CP_(cap)+MR·CP_(perf))C _(loss,add) P _(des)

where R_(loss) is the lost revenue over the duration of the frequencyresponse period.

Revenue loss estimator 420 may determine a present value of the revenueloss R_(loss) using the following equation:

$\lambda_{bat} = {\left\lbrack \frac{1 - \left( {1 + \frac{i}{n}} \right)^{- n}}{\frac{i}{n}} \right\rbrack R_{loss}}$

where n is the total number of frequency response periods (e.g., hours)during which the revenue loss occurs and λ_(bat) is the present value ofthe revenue loss during the ith frequency response period. In someembodiments, the revenue loss occurs over ten years (e.g., n=87,600hours). Revenue loss estimator 420 may provide the present value of therevenue loss λ_(bat) to frequency response optimizer 508 for use in theobjective function J.

Frequency response optimizer 508 may use the estimated performance scoreand the estimated battery degradation to define the terms in objectivefunction J. Frequency response optimizer 508 may determine values forfrequency response Res_(FR) that optimize objective function J. Invarious embodiments, frequency response optimizer 508 may use sequentialquadratic programming, dynamic programming, or any other optimizationtechnique.

Frequency Response Optimization Processes

Referring now to FIG. 6, a flowchart of a process 600 for determiningoptimal battery power setpoints in a frequency response optimizationsystem is shown, according to an exemplary embodiment. Process 600 maybe performed by one or more components of frequency responseoptimization system 100, as described with reference to FIGS. 1-5.

Process 600 is shown to include predicting regulation signal statistics,campus power use, and energy market statistics for one or more frequencyresponse periods (step 602). The regulation signal statistics mayinclude a mean and a standard deviation of the regulation signalReg_(signal). Predicting the campus power use may include predicting theelectric power consumption of the campus (e.g., P_(campus)) over theduration of the frequency response periods. In some embodiments,predicting campus power use includes predicting statistics of the campuspower use (e.g., mean, standard deviation, etc.). Predicting energymarket statistics may include predicting energy prices such aselectricity rates and demand charges. Predicting energy marketstatistics may also include predicting frequency response statisticssuch as clearing capability price CP_(cap), clearing performance priceCP_(perf), and mileage ratio MR.

Process 600 is shown to include determining frequency response midpointsthat maintain a battery at the same state of charge at the beginning andend of each frequency response period (step 604). Step 604 may beperformed by constant state of charge controller 402. In someembodiments, step 604 includes determining expected values for theregulation signal Reg_(signal), campus power use P_(campus), regulationaward Reg_(award), battery power loss P_(loss), and maximum batterypower P_(max). The expected value of the regulation award Reg_(award)may be assumed to be the difference between the midpoint b and the powerinverter power limit P_(limit) (e.g., Reg_(award)=P_(limit)−|b|). Themidpoint b which maintains the battery at the same state of charge atthe beginning and end of each frequency response period can bedetermined by solving the following equation:

${{{\frac{1}{4P_{\max}}\left\lbrack {{E\left\{ P_{campus}^{2} \right\}} + {{Reg}_{award}^{2}E\left\{ {Reg}_{signal}^{2} \right\}} - {2{Reg}_{award}E\left\{ {Reg}_{signal} \right\} E\left\{ P_{campus} \right\}}} \right\rbrack}\Delta \; t} + {\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack \Delta \; t} + {{\frac{b}{2P_{\max}}\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack}\Delta \; t} + {b\; \Delta \; t} + {\frac{b^{2}}{4P_{\max}}\Delta \; t}} = 0$

which can be solved for midpoint b.

Process 600 is shown to include generating an objective function thatestimates value as a function of frequency response revenue, energycosts, and monetized costs of losses in battery capacity (step 606). Anexemplary value function which may be generated in step 606 is shown inthe following equation:

$J = {{\sum\limits_{k = 1}^{h}{{Rev}\left( {Reg}_{{award},k} \right)}} + {\sum\limits_{k = 1}^{h}{c_{k}b_{k}}} + {\min\limits_{period}\left( {P_{{campus},k} + b_{k}} \right)} - {\sum\limits_{k = 1}^{h}\lambda_{{bat},k}}}$

where Rev(Reg_(award,k)) is the frequency response revenue, c_(k)b_(k)is the cost per unit of electricity, the min( ) term is the demandcharge, and λ_(bat,k) is the monetized cost of battery degradation.

The frequency response revenue may be determined using the followingequation:

Rev(Reg_(award))=PS·Reg_(award)(CP_(cap)+MR·CP_(perf))

where Reg_(award), CP_(cap), MR, and CP_(perf) are provided as knowninputs and PS is the performance score. In some embodiments, theperformance score PS is a composite weighting of an accuracy score, adelay score, and a precision score. The performance score PS may becalculated using the performance score model shown in the followingequation:

PS=⅓PS_(acc)+⅓PS_(delay)+⅓PS_(prec)

where PS_(acc) is the accuracy score, PS_(delay) is the delay score, andPS_(prec) is the precision score. In some embodiments, each term in theprecision score is assigned an equal weighting (e.g., ⅓). In otherembodiments, some terms may be weighted higher than others. Each of theterms in the performance score model may be calculated as previouslydescribed with reference to FIG. 4.

The cost of battery degradation may be determined using a battery lifemodel. An exemplary battery life model which may be used to determinebattery degradation is shown in the following equation:

C _(loss,add) =f ₁(T _(cell))+f ₂(SOC)+f ₃(DOD)+f ₄(PR)+f ₅(ER)−C_(loss,nom)

where T_(cell) is the cell temperature, SOC is the state of charge, DODis the depth of discharge, PR is the average power ratio

$\left( {{e.g.},{{PR} = {{avg}\left( \frac{P_{avg}}{P_{des}} \right)}}} \right),$

and ER is the average effort ratio

$\left( {{e.g.},{{ER} = {{avg}\left( \frac{\Delta \; P_{bat}}{P_{des}} \right)}}} \right.$

of battery 108. The terms in the battery life model may be calculated asdescribed with reference to FIGS. 4-5, using the frequency responseRes_(FR) as the optimization variable.

The battery capacity loss C_(loss,add) can be converted into lostrevenue using the following equation:

R _(loss)=(CP_(cap)+MR·CP_(perf))C _(loss,add) P _(des)

where R_(loss) is the lost revenue over the duration of the frequencyresponse period. The present value of the revenue loss R_(loss) can becalculated as follows:

$\lambda_{bat} = {\left\lbrack \frac{1 - \left( {1 + \frac{i}{n}} \right)^{- n}}{\frac{i}{n}} \right\rbrack R_{loss}}$

where n is the total number of frequency response periods (e.g., hours)during which the revenue loss occurs and λ_(bat) is the present value ofthe revenue loss during the ith frequency response period. In someembodiments, the revenue loss occurs over ten years (e.g., n=87,600hours).

Still referring to FIG. 6, process 600 is shown to include performing anoptimization to determine battery power setpoints that optimize theobjective function based on the midpoints (step 608). Step 608 may beperformed by low level controller 314, as described with reference toFIG. 5. Step 608 may include using the objective function to determinethe optimal frequency response Res_(FR). The optimal frequency responsemay be the frequency response which maximizes J. The optimal frequencyresponse Res_(FR) can be used to calculate the desired interconnectionpower P_(POI) ^(*) using the following equation:

P _(POI) ^(*)=Reg_(award)·Res_(FR) +b

Step 608 may include subtracting the campus power P_(campus) from thedesired interconnection power P_(POI) ^(*) to calculate the optimalbattery power setpoints P_(SP), as shown in the following equation:

P _(SP) =P _(POI) ^(*) −P _(campus)

Process 600 is shown to include using the battery power setpoints tocontrol an amount of power charged or discharged from the battery (step610). Step 610 may include providing the battery power setpoints to abattery power inverter (e.g., power inverter 106). The power invertermay use the battery power setpoints to an amount of power drawn from thebattery or stored in the battery during each of a plurality of timesteps. Power drawn from the battery may be used to power the campus orprovided to an energy grid.

Referring now to FIG. 7, a flowchart of a process 700 for determiningoptimal battery power setpoints in a frequency response optimizationsystem is shown, according to an exemplary embodiment. Process 700 maybe performed by one or more components of frequency responseoptimization system 100, as described with reference to FIGS. 1-5.

Process 700 is shown to include predicting regulation signal statistics,campus power use, and energy market statistics for one or more frequencyresponse periods (step 702). The regulation signal statistics mayinclude a mean and a standard deviation of the regulation signalReg_(signal). Predicting the campus power use may include predicting theelectric power consumption of the campus (e.g., P_(campus)) over theduration of the frequency response periods. In some embodiments,predicting campus power use includes predicting statistics of the campuspower use (e.g., mean, standard deviation, etc.). Predicting energymarket statistics may include predicting energy prices such aselectricity rates and demand charges. Predicting energy marketstatistics may also include predicting frequency response statisticssuch as clearing capability price CP_(cap), clearing performance priceCP_(perf), and mileage ratio MR.

Process 700 is shown to include generating an objective function thatestimates value as a function of frequency response revenue, energycosts, and monetized costs of losses in battery capacity (step 704). Anexemplary value function which may be generated in step 704 is shown inthe following equation:

$J = {{\sum\limits_{k = 1}^{h}{{Rev}\left( {Reg}_{{award},k} \right)}} + {\sum\limits_{k = 1}^{h}{c_{k}b_{k}}} + {\min\limits_{period}\left( {P_{{campus},k} + b_{k}} \right)} - {\sum\limits_{k = 1}^{h}\lambda_{{bat},k}}}$

where Rev(Reg_(award,k)) is the frequency response revenue, c_(k)b_(k)is the cost per unit of electricity, the min( ) term is the demandcharge, and λ_(bat,k) is the monetized cost of battery degradation.

The frequency response revenue may be determined using the followingequation:

Rev(Reg_(award))=Reg_(award)(CP_(cap)+MR·CP_(perf))

where Reg_(award), CP_(cap), MR, and CP_(perf) are provided as knowninputs and PS is the performance score.

The cost of battery degradation may be determined using a battery lifemodel. An exemplary battery life model which may be used to determinebattery degradation is shown in the following equation:

C _(loss,add) =f ₁(T _(cell))+f ₂(SOC)+f ₃(DOD)+f ₄(PR)+f ₅(ER)−C_(loss,nom)

where T_(cell) is the cell temperature, SOC is the state of charge, DODis the depth of discharge, PR is the average power ratio

$\left( {{e.g.},{{PR} = {{avg}\left( \frac{P_{avg}}{P_{des}} \right)}}} \right),$

and ER the average effort ratio

$\left( {{e.g.},{{ER} = {{avg}\left( \frac{\Delta \; P_{bat}}{P_{des}} \right)}}} \right.$

of battery 108. The terms in the battery life model may be calculated asdescribed with reference to FIGS. 4-5, using the midpoint b as theoptimization variable.

The battery capacity loss C_(loss,add) can be converted into lostrevenue using the following equation:

R _(loss)=(CP_(cap)+MR·CP_(perf))C _(loss,add) P _(des)

where R_(loss) is the lost revenue over the duration of the frequencyresponse period. The present value of the revenue loss R_(loss) can becalculated as follows:

${{{\frac{1}{4P_{\max}}\left\lbrack {{E\left\{ P_{campus}^{2} \right\}} + {{Reg}_{award}^{2}E\left\{ {Reg}_{signal}^{2} \right\}} - {2{Reg}_{award}E\left\{ {Reg}_{signal} \right\} E\left\{ P_{campus} \right\}}} \right\rbrack}\Delta \; t} + {\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack \Delta \; t} + {{\frac{b}{2P_{\max}}\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack}\Delta \; t} + {b\; \Delta \; t} + {\frac{b^{2}}{4P_{\max}}\Delta \; t}} = 0$

where n is the total number of frequency response periods (e.g., hours)during which the revenue loss occurs and λ_(bat) is the present value ofthe revenue loss during the ith frequency response period. In someembodiments, the revenue loss occurs over ten years (e.g., n=87,600hours).

Process 700 is shown to include performing a high level optimization todetermine frequency response midpoints that optimize the objectivefunction based on the predicted regulation signal statistics (step 706).Step 706 may be performed by variable state of charge controller 408.Step 706 may include determining a set of midpoints b that maximize theobjective function J. The optimization may be subject to optimizationconstraints. For example, step 706 may include implementing optimizationconstraints that keep the state of charge of the battery betweenthreshold values (e.g., between 0 and 1) and/or constraints that preventsum of the midpoint b and the campus power P_(campus) from exceeding thepower inverter rating P_(limit), as described with respect tooptimization constraints module 414.

In some embodiments, step 706 includes determining expected values forthe regulation signal Reg_(signal), campus power use P_(campus),regulation award Reg_(award), battery power loss P_(loss), and maximumbattery power P_(max). The expected value of the regulation award Re amay be assumed to be the difference between the midpoint b and the powerinverter power limit P_(limit) (e.g., Reg_(award)=P_(limit)−|b|). Themidpoint b can be expressed in terms of the change in the state ofcharge of the battery by solving the following equation:

${{\frac{1}{4P_{\max}}\left\lbrack {{E\left\{ P_{campus}^{2} \right\}} + {Reg}_{award}^{2} + {E\left\{ {Reg}_{signal}^{2} \right\}} - {2{Reg}_{award}E\left\{ {Reg}_{signal} \right\} E\left\{ P_{campus} \right\}}} \right\rbrack}{\Delta t}} + {\quad{\quad{{\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} + {E\left\{ P_{campus} \right\}}} \right\rbrack {\Delta t}} + {{\Delta {SOC}} \cdot C_{des}} + {\quad{{{{\frac{b}{2P_{\max}}\left\lbrack {{{Reg}_{award}E\left\{ {Reg}_{signal} \right\}} - {E\left\{ P_{campus} \right\}}} \right\rbrack}{\Delta t}} + {b\Delta t} + {\frac{b^{2}}{4P_{\max}}{\Delta t}}} = 0}}}}}$

This relationship between midpoint b and the change in the SOC may beused to translate constraints on the SOC of the battery into constraintson midpoint b. The optimization problem can then be solved to determineoptimal values for midpoint b.

Still referring to FIG. 7, process 700 is shown to include performing alow level optimization to determine battery power setpoints thatoptimize the objective function based on the midpoints (step 708). Step708 may be performed by low level controller 314, as described withreference to FIG. 5. Step 708 may include using the objective functionto determine the optimal frequency response Res_(FR). The optimalfrequency response may be the frequency response which maximizes J. Theoptimal frequency response Res_(FR) can be used to calculate the desiredinterconnection power P_(POI) ^(*) using the following equation:

P _(POI) ^(*)=Reg_(award)·Res_(FR) +b

Step 708 may include subtracting the campus power P_(campus) from thedesired interconnection power P_(POI) ^(*) to calculate the optimalbattery power setpoints P_(SP), as shown in the following equation:

P _(SP) =P _(POI) ^(*) −P _(campus)

Process 700 is shown to include using the battery power setpoints tocontrol an amount of power charged or discharged from the battery (step710). Step 710 may include providing the battery power setpoints to abattery power inverter (e.g., power inverter 106). The power invertermay use the battery power setpoints to an amount of power drawn from thebattery or stored in the battery during each of a plurality of timesteps. Power drawn from the battery may be used to power the campus orprovided to an energy grid.

Low Level Controller

Referring now to FIGS. 8-10, several block diagrams illustrating lowlevel controller 314 in greater detail are shown, according to variousexemplary embodiments. In FIG. 8, low level controller 314 is shown as abaseline controller without cost optimization. In FIG. 9, low levelcontroller 314 is shown as an optimal controller with cost optimization.FIG. 10 illustrates the embodiment shown in FIG. 9 in greater detail. Ineach of FIGS. 8-10, low level controller 314 is shown receiving an inputFR_(5×1), which represents a five-sample block of the frequencyregulation signal. For embodiments in which the frequency regulationsignal is sampled at two-second intervals, the five-sample blockrepresents ten seconds of the frequency regulation signal.

Referring particularly to FIG. 8, a block diagram illustrating low levelcontroller 314 as a baseline controller is shown, according to anexemplary embodiment. Low level controller 314 is shown to includeinverter dynamics 802, a performance score calculator 804, and acost/revenue calculator 806. Inverter dynamics 802 may receive thefrequency regulation signal FR_(5×1) and convert the frequencyregulation signal FR_(5×1) into a power setpoint MW_(k) for the batterypower inverter. In some embodiments, inverter dynamics 802 converts thefrequency regulation signal FR_(5×1) into a power setpoint MW_(k) usingthe following equation:

${MW}_{k} = {{{MW}_{k - 1}^{- \frac{\Delta t}{\tau}}} + {\left( {1 - ^{- \frac{\Delta t}{\tau}}} \right){FR}_{k - 1}}}$

where MW_(k) and MW_(k−1) are the current and previous values of thepower signal MW, Δt is the interval between samples of the frequencyregulation signal and/or power signal (e.g., 2 seconds), and τ is a timeconstant (e.g., 0.2 seconds).

Performance score calculator 804 may calculate the performance score PSbased on the values of the power signal MW_(k). In some embodiments, theperformance score PS is a composite weighting of an accuracy score, adelay score, and a precision score. Performance score calculator 804 maycalculate the performance score PS using the performance score modelshown in the following equation:

PS=⅓PS_(acc)+⅓PS_(delay)+⅓PS_(prec)

where PS_(acc) is the accuracy score, PS_(delay) is the delay score, andPS_(prec) is the precision score. In some embodiments, each term in theprecision score is assigned an equal weighting (e.g., ⅓). In otherembodiments, some terms may be weighted higher than others.

The accuracy score PS_(acc) may be the maximum correlation between theregulation signal Reg_(signal) and the optimal frequency responseRes_(FR). Performance score calculator 804 may calculate the accuracyscore PS_(acc) using the following equation:

${PS}_{acc} = {\max\limits_{\delta}r_{{Reg},{{Res}{(\delta)}}}}$

where δ is a time delay between zero and δ_(max) (e.g., between zero andfive minutes).

The delay score PS_(delay) may be based on the time delay 6 between theregulation signal Reg_(signal) and the optimal frequency responseRes_(FR). Performance score calculator 804 may calculate the delay scorePS_(delay) using the following equation:

${PS}_{delay} = {\frac{{\delta \lbrack s\rbrack} - \delta_{\max}}{\delta_{\max}}}$

where δ[s] is the time delay of the frequency response Res_(FR) relativeto the regulation signal Reg_(signal) and δ_(max) is the maximumallowable delay (e.g., 5 minutes or 300 seconds).

The precision score PS_(prec) may be based on a difference between thefrequency response Res_(FR) and the regulation signal Reg_(signal)Performance score calculator 804 may calculate the precision scorePS_(prec) using the following equation:

${PS}_{prec} = {1 - \frac{\Sigma {{{Res}_{FR} - {Reg}_{signal}}}}{\Sigma {{Reg}_{signal}}}}$

Cost/revenue calculator 806 may calculate the revenue J_(BC) (baselinecontroller revenue) resulting from operating the performance score PS.In some embodiments, cost/revenue calculator 806 calculates revenueJ_(BC) using the following equation:

J _(BC)=PS·Reg_(award)(CP_(cap)+MR·CP_(perf))

In the embodiment shown in FIG. 8, low level controller 314 does notconsider battery degradation costs and therefore J_(BC) does not includea cost associated with battery degradation.

Referring now to FIG. 9, a block diagram illustrating low levelcontroller 314 as an optimal controller is shown, according to anexemplary embodiment. Low level controller 314 is shown to includeinverter dynamics 802, performance score calculator 804, andcost/revenue calculator 806, which may be the same or similar asdescribed with reference to FIG. 8. However, in the embodiment shown inFIG. 9, cost/revenue calculator 806 calculates an optimized revenueJ_(OC) which considers battery degradation costs λ_(bat). For example,cost/revenue calculator 806 may calculate revenue J_(OC) using thefollowing equation:

J _(OC)=PS·Reg_(award)(CP_(cap)+MR·CP_(perf))−λ_(bat)

where λ_(bat) is the cost of battery degradation. The difference betweenJ_(BC) and J_(OC) represents the cost (or foregone revenue) resultingfrom different control decisions made by low level controller 314 in theinterest of protecting the battery, as shown in the following equation:

Cost to Protect Battery=J _(BC) −J _(OC)

In the embodiment shown in FIG. 9, inverter dynamics 802 is shownreceiving an optimal regulation signal

^(*) _(sp,5×1) rather than the original regulation signal FR_(5×1). Lowlevel controller 314 may be configured to generate the optimalregulation signal

^(*) _(sp,5×1) by processing the original regulation signal FR_(5×1)with regulation signal predictor 902, low pass filter 904, and dynamicprogramming 906.

Regulation signal predictor 902 may use the original samples of theregulation signal FR_(5×1) to predict future values of the regulationsignal

_(5×1). In some embodiments, regulation signal predictor 902 predictsthe regulation signal

_(5×1) using an autoregressive (AR) model. For example, regulationsignal predictor 902 may generate a 5^(th) order AR model of the form:

A(z)FR_(5×1) =e(t)

where A(z) is of the form:

A(z)=1+A ₁ z ⁻¹ +A ₂ z ⁻² +A ₃ z ⁻³ +A ₄ z ⁻⁴ +A ₅ z ⁻⁵

where the values of A₁-A₅ are based on the original frequency responsesignal FR_(5×1). In an exemplary embodiment A₁-A₅ have the followingvalues:

-   -   A₁=−0.97522    -   A₂=−0.37687    -   A₃=−0.30623    -   A₄=−0.19011    -   A₅=0.23978

In other embodiments, regulation signal predictor 902 uses adeterministic plus stochastic model trained from historical regulationsignal data to predict future values of the regulation signal

_(5×1). For example, regulation signal predictor 902 may use linearregression to predict a deterministic portion of the regulation signal

_(5×1) and an AR model to predict a stochastic portion of the regulationsignal

_(5×1). In some embodiments, regulation signal predictor 902 predictsthe regulation signal

_(5×1) using the techniques described in U.S. patent application Ser.No. 14/717,593, titled “Building Management System for Forecasting TimeSeries Values of Building Variables” and filed May 20, 2015.

Low pass filter 904 may filter the predicted regulation signal

_(5×1) using the filter parameters provided by high level controller 312to remove high frequency components from the predicted regulation signal

_(5×1). In some embodiments, low pass filter 904 generates a filteredpredicted regulation signal

_(LPF,5×1) using the following equation:

_(LPF,k+1)=α

_(LPF,k)+(1−∝)({tilde over (k)}

_(k))

where ∝ and {tilde over (k)} are the filter parameters received fromhigh level controller 312. In an exemplary embodiment, ∝=0.5 and {tildeover (k)}=1.

Dynamic programming 906 may be configured to use the filtered datapoints in

_(LPF,5×1) to determine the scaling coefficients k_(5×1) that maximizethe value function J_(OC). For example, dynamic programming 906 may beconfigured to vary the scaling coefficients k_(5×1) over a range ofstates (e.g., k_(5×1)=[0.7:0.1:1.3]) and calculate the batterydegradation cost λ_(batt), performance score PS, and value J_(OC) thatresults from different values of k_(5×1). Dynamic programming 906 mayfind the scaling coefficients k_(5×1) that result in the maximum valueJ_(OC).

Referring now to FIG. 10, another block diagram of low level controller314 is shown, according to an exemplary embodiment. FIG. 10 illustratesthe embodiment shown in FIG. 9 in greater detail. Regulation signalpredictor 902 is shown receiving the regulation signal FR_(5×1) andusing the regulation signal FR_(5×1) to generate a predicted regulationsignal

_(5×1). In some embodiments, regulation signal predictor 902 divides theregulation signal into 50-sample blocks and performs the prediction onthe individual 50-sample blocks to generate the predicted regulationsignals

_(5×1).

Low pass filter 904 may filter individual 5-sample blocks (i.e., tenseconds of predicted regulation signal data) to generate the filteredregulation signal values

_(LPF,5×1). Low pass filter 904 provides the filtered values

_(LPF,5×1) to dynamic programming 906. Dynamic programming 906 maymultiply the filtered values

_(LPF,5×1) scaling coefficients k_(FR,5×1) to generate the optimalfrequency response

^(*) _(sp,5×1). In some embodiments, dynamic programming 906 performselement-by-element multiplication as shown in the following equation:

sp , 5 × 1 * = [ 1 · k FR , 1 2 · k FR , 2 3 · k FR , 3 4 · k FR , 4 5 ·k FR , 5 ]

where the values for the scaling coefficients k_(FR,5×1) are determinedusing an optimization process. For example, dynamic programming 906 isshown receiving the revenue J_(OC) from cost/revenue calculator 806.Dynamic programming 906 may select values of k_(FR,5×1) that optimize(e.g., maximize) the revenue value J_(OC).

The optimal frequency response

^(*) _(sp,5×1) is provided to inverter dynamics 802 which converts thefrequency response

^(*) _(sp,5×1) into battery power setpoints MW_(sp,5×1). The batterypower setpoints MW_(sp,5×1) may be provided as inputs to bothperformance score calculator 804 and battery life model 908. Performancescore calculator 804 uses the battery power setpoints MW_(sp,5×1) todetermine a resultant performance score PS. Battery life model 908 usesthe battery power setpoints MW_(sp,5×1) to estimate a batterydegradation cost λ_(bat), as previously described.

Both the performance score PS and the battery degradation cost λ_(bat)may be provided as inputs to cost/revenue calculator 806. Cost/revenuecalculator 806 may use the performance score PS and the batterydegradation cost λ_(bat) to estimate amount of revenue J_(OC) that willresult from the battery power setpoints MW_(sp,5×1). In someembodiments, cost/revenue calculator 806 estimates revenue J_(OC) usingthe following equation:

J _(OC)=PS·Reg_(award)(CP_(cap)+MR·CP_(perf))−λ_(bat)

The revenue J_(OC) may be provided as a feedback to dynamic programming906 for use in optimizing the scaling coefficients k_(FR,5×1).Electrical Energy Storage System with Frequency Regulation and Ramp RateControl

Referring now to FIGS. 11-12, an electrical energy storage system 1100is shown, according to an exemplary embodiment. System 1100 can usebattery storage to perform both ramp rate control and frequencyregulation. Ramp rate control is the process of offsetting ramp rates(i.e., increases or decreases in the power output of an energy systemsuch as a photovoltaic energy system) that fall outside of compliancelimits determined by the electric power authority overseeing the energygrid. Ramp rate control typically requires the use of an energy sourcethat allows for offsetting ramp rates by either supplying additionalpower to the grid or consuming more power from the grid. In someinstances, a facility is penalized for failing to comply with ramp raterequirements.

Frequency regulation is the process of maintaining the stability of thegrid frequency (e.g., 60 Hz in the United States). The grid frequencymay remain balanced as long as there is a balance between the demandfrom the energy grid and the supply to the energy grid. An increase indemand yields a decrease in grid frequency, whereas an increase insupply yields an increase in grid frequency. During a fluctuation of thegrid frequency, system 1100 may offset the fluctuation by either drawingmore energy from the energy grid (e.g., if the grid frequency is toohigh) or by providing energy to the energy grid (e.g., if the gridfrequency is too low). Advantageously, system 1100 may use batterystorage in combination with photovoltaic power to perform frequencyregulation while simultaneously complying with ramp rate requirementsand maintaining the state-of-charge of the battery storage within apredetermined desirable range.

System 1100 is shown to include a photovoltaic (PV) field 1102, a PVfield power inverter 1104, a battery 1106, a battery power inverter1108, a point of interconnection (POI) 1110, and an energy grid 1112. Insome embodiments, system 1100 also includes a controller 1114 (shown inFIG. 11) and/or a building 1118 (shown in FIG. 12). In brief overview,PV field power inverter 1104 can be operated by controller 1114 tocontrol the power output of PV field 1102. Similarly, battery powerinverter 1108 can be operated by controller 1114 to control the powerinput and/or power output of battery 1106. The power outputs of PV fieldpower inverter 1104 and battery power inverter 1108 combine at POI 1110to form the power provided to energy grid 1112. In some embodiments,building 1118 is also connected to POI 1110. Building 1118 can consume aportion of the combined power at POI 1110 to satisfy the energyrequirements of building 1118.

PV field 1102 may include a collection of photovoltaic cells. Thephotovoltaic cells are configured to convert solar energy (i.e.,sunlight) into electricity using a photovoltaic material such asmonocrystalline silicon, polycrystalline silicon, amorphous silicon,cadmium telluride, copper indium gallium selenide/sulfide, or othermaterials that exhibit the photovoltaic effect. In some embodiments, thephotovoltaic cells are contained within packaged assemblies that formsolar panels. Each solar panel may include a plurality of linkedphotovoltaic cells. The solar panels may combine to form a photovoltaicarray.

PV field 1102 may have any of a variety of sizes and/or locations. Insome embodiments, PV field 1102 is part of a large-scale photovoltaicpower station (e.g., a solar park or farm) capable of providing anenergy supply to a large number of consumers. When implemented as partof a large-scale system, PV field 1102 may cover multiple hectares andmay have power outputs of tens or hundreds of megawatts. In otherembodiments, PV field 1102 may cover a smaller area and may have arelatively lesser power output (e.g., between one and ten megawatts,less than one megawatt, etc.). For example, PV field 1102 may be part ofa rooftop-mounted system capable of providing enough electricity topower a single home or building. It is contemplated that PV field 1102may have any size, scale, and/or power output, as may be desirable indifferent implementations.

PV field 1102 may generate a direct current (DC) output that depends onthe intensity and/or directness of the sunlight to which the solarpanels are exposed. The directness of the sunlight may depend on theangle of incidence of the sunlight relative to the surfaces of the solarpanels. The intensity of the sunlight may be affected by a variety ofenvironmental factors such as the time of day (e.g., sunrises andsunsets) and weather variables such as clouds that cast shadows upon PVfield 1102. When PV field 1102 is partially or completely covered byshadow, the power output of PV field 1102 (i.e., PV field power P_(PV))may drop as a result of the decrease in solar intensity.

In some embodiments, PV field 1102 is configured to maximize solarenergy collection. For example, PV field 1102 may include a solartracker (e.g., a GPS tracker, a sunlight sensor, etc.) that adjusts theangle of the solar panels so that the solar panels are aimed directly atthe sun throughout the day. The solar tracker may allow the solar panelsto receive direct sunlight for a greater portion of the day and mayincrease the total amount of power produced by PV field 1102. In someembodiments, PV field 1102 includes a collection of mirrors, lenses, orsolar concentrators configured to direct and/or concentrate sunlight onthe solar panels. The energy generated by PV field 1102 may be stored inbattery 1106 or provided to energy grid 1112.

Still referring to FIG. 11, system 1100 is shown to include a PV fieldpower inverter 1104. Power inverter 1104 may be configured to convertthe DC output of PV field 1102 P_(PV) into an alternating current (AC)output that can be fed into energy grid 1112 or used by a local (e.g.,off-grid) electrical network and/or by building 1118. For example, powerinverter 1104 may be a solar inverter or grid-tie inverter configured toconvert the DC output from PV field 1102 into a sinusoidal AC outputsynchronized to the grid frequency of energy grid 1112. In someembodiments, power inverter 1104 receives a cumulative DC output from PVfield 1102. For example, power inverter 1104 may be a string inverter ora central inverter. In other embodiments, power inverter 1104 mayinclude a collection of micro-inverters connected to each solar panel orsolar cell. PV field power inverter 1104 may convert the DC power outputP_(PV) into an AC power output u_(PV) and provide the AC power outputu_(PV) to POI 1110.

Power inverter 1104 may receive the DC power output P_(PV) from PV field1102 and convert the DC power output to an AC power output that can befed into energy grid 1112. Power inverter 1104 may synchronize thefrequency of the AC power output with that of energy grid 1112 (e.g., 50Hz or 60 Hz) using a local oscillator and may limit the voltage of theAC power output to no higher than the grid voltage. In some embodiments,power inverter 1104 is a resonant inverter that includes or uses LCcircuits to remove the harmonics from a simple square wave in order toachieve a sine wave matching the frequency of energy grid 1112. Invarious embodiments, power inverter 1104 may operate usinghigh-frequency transformers, low-frequency transformers, or withouttransformers. Low-frequency transformers may convert the DC output fromPV field 1102 directly to the AC output provided to energy grid 1112.High-frequency transformers may employ a multi-step process thatinvolves converting the DC output to high-frequency AC, then back to DC,and then finally to the AC output provided to energy grid 1112.

Power inverter 1104 may be configured to perform maximum power pointtracking and/or anti-islanding. Maximum power point tracking may allowpower inverter 1104 to produce the maximum possible AC power from PVfield 1102. For example, power inverter 1104 may sample the DC poweroutput from PV field 1102 and apply a variable resistance to find theoptimum maximum power point. Anti-islanding is a protection mechanismthat immediately shuts down power inverter 1104 (i.e., preventing powerinverter 1104 from generating AC power) when the connection to anelectricity-consuming load no longer exists. In some embodiments, PVfield power inverter 1104 performs ramp rate control by limiting thepower generated by PV field 1102.

PV field power inverter 1104 can include any of a variety of circuitcomponents (e.g., resistors, capacitors, indictors, transformers,transistors, switches, diodes, etc.) configured to perform the functionsdescribed herein. In some embodiments DC power from PV field 1102 isconnected to a transformer of PV field power inverter 1104 through acenter tap of a primary winding. A switch can be rapidly switched backand forth to allow current to flow back to PV field 1102 following twoalternate paths through one end of the primary winding and then theother. The alternation of the direction of current in the primarywinding of the transformer can produce alternating current (AC) in asecondary circuit.

In some embodiments, PV field power inverter 1104 uses anelectromechanical switching device to convert DC power from PV field1102 into AC power. The electromechanical switching device can includetwo stationary contacts and a spring supported moving contact. Thespring can hold the movable contact against one of the stationarycontacts, whereas an electromagnet can pull the movable contact to theopposite stationary contact. Electric current in the electromagnet canbe interrupted by the action of the switch so that the switchcontinually switches rapidly back and forth. In some embodiments, PVfield power inverter 1104 uses transistors, thyristors (SCRs), and/orvarious other types of semiconductor switches to convert DC power fromPV field 1102 into AC power. SCRs provide large power handlingcapability in a semiconductor device and can readily be controlled overa variable firing range.

In some embodiments, PV field power inverter 1104 produces a squarevoltage waveform (e.g., when not coupled to an output transformer). Inother embodiments, PV field power inverter 1104 produces a sinusoidalwaveform that matches the sinusoidal frequency and voltage of energygrid 1112. For example, PV field power inverter 1104 can use Fourieranalysis to produce periodic waveforms as the sum of an infinite seriesof sine waves. The sine wave that has the same frequency as the originalwaveform is called the fundamental component. The other sine waves,called harmonics, that are included in the series have frequencies thatare integral multiples of the fundamental frequency.

In some embodiments, PV field power inverter 1104 uses inductors and/orcapacitors to filter the output voltage waveform. If PV field powerinverter 1104 includes a transformer, filtering can be applied to theprimary or the secondary side of the transformer or to both sides.Low-pass filters can be applied to allow the fundamental component ofthe waveform to pass to the output while limiting the passage of theharmonic components. If PV field power inverter 1104 is designed toprovide power at a fixed frequency, a resonant filter can be used. If PVfield power inverter 1104 is an adjustable frequency inverter, thefilter can be tuned to a frequency that is above the maximum fundamentalfrequency. In some embodiments, PV field power inverter 1104 includesfeedback rectifiers or antiparallel diodes connected acrosssemiconductor switches to provide a path for a peak inductive loadcurrent when the switch is turned off. The antiparallel diodes can besimilar to freewheeling diodes commonly used in AC/DC convertercircuits.

Still referring to FIG. 11, system 1100 is shown to include a batterypower inverter 1108. Battery power inverter 1108 may be configured todraw a DC power P_(bat) from battery 1106, convert the DC power P_(bat)into an AC power u_(bat), and provide the AC power u_(bat) to POI 1110.Battery power inverter 1108 may also be configured to draw the AC poweru_(bat) from POI 1110, convert the AC power u_(bat) into a DC batterypower P_(bat), and store the DC battery power P_(bat) in battery 1106.As such, battery power inverter 1108 can function as both a powerinverter and a rectifier to convert between DC and AC in eitherdirection. The DC battery power P_(bat) may be positive if battery 1106is providing power to battery power inverter 1108 (i.e., if battery 1106is discharging) or negative if battery 1106 is receiving power frombattery power inverter 1108 (i.e., if battery 1106 is charging).Similarly, the AC battery power u_(bat) may be positive if battery powerinverter 1108 is providing power to POI 1110 or negative if batterypower inverter 1108 is receiving power from POI 1110.

The AC battery power u_(bat) is shown to include an amount of power usedfor frequency regulation (i.e., u_(FR)) and an amount of power used forramp rate control (i.e., u_(RR)) which together form the AC batterypower (i.e., u_(bat)=u_(FR)+u_(RR)). The DC battery power P_(bat) isshown to include both u_(FR) and u_(RR) as well as an additional termP_(loss) representing power losses in battery 1106 and/or battery powerinverter 1108 (i.e., P_(bat)=u_(FR)+u_(RR)+P_(loss)). The PV field poweru_(PV) and the battery power u_(bat) combine at POI 1110 to form P_(POI)(i.e., P_(POI)=u_(PV)+u_(bat)), which represents the amount of powerprovided to energy grid 1112. P_(POI) may be positive if POI 1110 isproviding power to energy grid 1112 or negative if POI 1110 is receivingpower from energy grid 1112.

Like PV field power inverter 1104, battery power inverter 1108 caninclude any of a variety of circuit components (e.g., resistors,capacitors, indictors, transformers, transistors, switches, diodes,etc.) configured to perform the functions described herein. Batterypower inverter 1108 can include many of the same components as PV fieldpower inverter 1104 and can operate using similar principles. Forexample, battery power inverter 1108 can use electromechanical switchingdevices, transistors, thyristors (SCRs), and/or various other types ofsemiconductor switches to convert between AC and DC power. Battery powerinverter 1108 can operate the circuit components to adjust the amount ofpower stored in battery 1106 and/or discharged from battery 1106 (i.e.,power throughput) based on a power control signal or power setpoint fromcontroller 1114.

Still referring to FIG. 11, system 1100 is shown to include a controller1114. Controller 1114 may be configured to generate a PV power setpointu_(PV) for PV field power inverter 1104 and a battery power setpointu_(bat) for battery power inverter 1108. Throughout this disclosure, thevariable u_(PV) is used to refer to both the PV power setpoint generatedby controller 1114 and the AC power output of PV field power inverter1104 since both quantities have the same value. Similarly, the variableu_(bat) is used to refer to both the battery power setpoint generated bycontroller 1114 and the AC power output/input of battery power inverter1108 since both quantities have the same value.

PV field power inverter 1104 uses the PV power setpoint u_(PV) tocontrol an amount of the PV field power P_(PV) to provide to POI 1110.The magnitude of u_(PV) may be the same as the magnitude of P_(PV) orless than the magnitude of P_(PV). For example, u_(PV) may be the sameas P_(PV) if controller 1114 determines that PV field power inverter1104 is to provide all of the photovoltaic power P_(PV) to POI 1110.However, u_(PV) may be less than P_(PV) if controller 1114 determinesthat PV field power inverter 1104 is to provide less than all of thephotovoltaic power P_(PV) to POI 1110. For example, controller 1114 maydetermine that it is desirable for PV field power inverter 1104 toprovide less than all of the photovoltaic power P_(PV) to POI 1110 toprevent the ramp rate from being exceeded and/or to prevent the power atPOI 1110 from exceeding a power limit.

Battery power inverter 1108 uses the battery power setpoint u_(bat) tocontrol an amount of power charged or discharged by battery 1106. Thebattery power setpoint u_(bat) may be positive if controller 1114determines that battery power inverter 1108 is to draw power frombattery 1106 or negative if controller 1114 determines that batterypower inverter 1108 is to store power in battery 1106. The magnitude ofu_(bat) controls the rate at which energy is charged or discharged bybattery 1106.

Controller 1114 may generate u_(PV) and u_(bat) based on a variety ofdifferent variables including, for example, a power signal from PV field1102 (e.g., current and previous values for P_(PV)), the currentstate-of-charge (SOC) of battery 1106, a maximum battery power limit, amaximum power limit at POI 1110, the ramp rate limit, the grid frequencyof energy grid 1112, and/or other variables that can be used bycontroller 1114 to perform ramp rate control and/or frequencyregulation. Advantageously, controller 1114 generates values for u_(PV)and u_(bat) that maintain the ramp rate of the PV power within the ramprate compliance limit while participating in the regulation of gridfrequency and maintaining the SOC of battery 1106 within a predetermineddesirable range. An exemplary controller which can be used as controller1114 and exemplary processes which may be performed by controller 1114to generate the PV power setpoint u_(PV) and the battery power setpointu_(bat) are described in detail in U.S. Provisional Patent ApplicationNo. 62/239,245 filed Oct. 8, 2015, the entire disclosure of which isincorporated by reference herein.

Reactive Ramp Rate Control

Controller 1114 may be configured to control a ramp rate of the poweroutput 1116 provided to energy grid 1112. Ramp rate may be defined asthe time rate of change of power output 1116. Power output 1116 may varydepending on the magnitude of the DC output provided by PV field 1102.For example, if a cloud passes over PV field 1102, power output 1116 mayrapidly and temporarily drop while PV field 1102 is within the cloud'sshadow. Controller 1114 may be configured to calculate the ramp rate bysampling power output 1116 and determining a change in power output 1116over time. For example, controller 1114 may calculate the ramp rate asthe derivative or slope of power output 1116 as a function of time, asshown in the following equations:

${{Ramp}\mspace{14mu} {Rate}} = {{\frac{P}{t}\mspace{14mu} {or}\mspace{14mu} {Ramp}\mspace{14mu} {Rate}} = \frac{\Delta P}{\Delta t}}$

where P represents power output 1116 and t represents time.

In some embodiments, controller 1114 controls the ramp rate to complywith regulatory requirements or contractual requirements imposed byenergy grid 1112. For example, system 1100 may be required to maintainthe ramp rate within a predetermined range in order to deliver power toenergy grid 1112. In some embodiments, system 1100 is required tomaintain the absolute value of the ramp rate at less than a thresholdvalue (e.g., less than 10% of the rated power capacity per minute). Inother words, system 1100 may be required to prevent power output 1116from increasing or decreasing too rapidly. If this requirement is notmet, system 1100 may be deemed to be in non-compliance and its capacitymay be de-rated, which directly impacts the revenue generation potentialof system 1100.

Controller 1114 may use battery 1106 to perform ramp rate control. Forexample, controller 1114 may use energy from battery 1106 to smooth asudden drop in power output 1116 so that the absolute value of the ramprate is less than a threshold value. As previously mentioned, a suddendrop in power output 1116 may occur when a solar intensity disturbanceoccurs, such as a passing cloud blocking the sunlight to PV field 1102.Controller 1114 may use the energy from battery 1106 to make up thedifference between the power provided by PV field 1102 (which hassuddenly dropped) and the minimum required power output 1116 to maintainthe required ramp rate. The energy from battery 1106 allows controller1114 to gradually decrease power output 1116 so that the absolute valueof the ramp rate does not exceed the threshold value.

Once the cloud has passed, the power output from PV field 1102 maysuddenly increase as the solar intensity returns to its previous value.Controller 1114 may perform ramp rate control by gradually ramping uppower output 1116. Ramping up power output 1116 may not require energyfrom battery 1106. For example, power inverter 1104 may use only aportion of the energy generated by PV field 1102 (which has suddenlyincreased) to generate power output 1116 (i.e., limiting the poweroutput) so that the ramp rate of power output 1116 does not exceed thethreshold value. The remainder of the energy generated by PV field 1102(i.e., the excess energy) may be stored in battery 1106 and/ordissipated. Limiting the energy generated by PV field 1102 may includediverting or dissipating a portion of the energy generated by PV field1102 (e.g., using variable resistors or other circuit elements) so thatonly a portion of the energy generated by PV field 1102 is provided toenergy grid 1112. This allows power inverter 1104 to ramp up poweroutput 1116 gradually without exceeding the ramp rate. The excess energymay be stored in battery 1106, used to power other components of system1100, or dissipated.

Referring now to FIG. 13, a graph 1300 illustrating a reactive ramp ratecontrol technique which can be used by system 1100 is shown, accordingto an exemplary embodiment. Graph 1300 plots the power output P providedto energy grid 1112 as a function of time t. The solid line 1302illustrates power output P without any ramp rate control, whereas thebroken line 1304 illustrates power output P with ramp rate control.

Between times t₀ and t₁, power output P is at a high value P_(high). Attime t₁, a cloud begins to cast its shadow on PV field 1102, causing thepower output of PV field 1102 to suddenly decrease, until PV field 1102is completely in shadow at time t₂. Without any ramp rate control, thesudden drop in power output from PV field 1102 causes the power output Pto rapidly drop to a low value P_(low) at time t₂. However, with ramprate control, system 1100 uses energy from battery 1106 to graduallydecrease power output P to P_(low) at time t₃. Triangular region 1306represents the energy from battery 1106 used to gradually decrease poweroutput P.

Between times t₂ and t₄, PV field 1102 is completely in shadow. At timet₄, the shadow cast by the cloud begins to move off PV field 1102,causing the power output of PV field 1102 to suddenly increase, until PVfield 1102 is entirely in sunlight at time t₅. Without any ramp ratecontrol, the sudden increase in power output from PV field 1102 causesthe power output P to rapidly increase to the high value P_(high) attime t₅. However, with ramp rate control, power inverter 1104 limits theenergy from PV field 1102 to gradually increase power output P toP_(high) at time t₆. Triangular region 1308 represents the energygenerated by PV field 1102 in excess of the ramp rate limit. The excessenergy may be stored in battery 1106 and/or dissipated in order togradually increase power output P at a rate no greater than the maximumallowable ramp rate.

Notably, both triangular regions 1306 and 1308 begin after a change inthe power output of PV field 1102 occurs. As such, both the decreasingramp rate control and the increasing ramp rate control provided bysystem 1100 are reactionary processes triggered by a detected change inthe power output. In some embodiments, a feedback control technique isused to perform ramp rate control in system 1100. For example,controller 1114 may monitor power output 1116 and determine the absolutevalue of the time rate of change of power output 1116 (e.g., dP/dt orΔP/Δt). Controller 1114 may initiate ramp rate control when the absolutevalue of the time rate of change of power output 1116 exceeds athreshold value.

Preemptive Ramp Rate Control

In some embodiments, controller 1114 is configured to predict when solarintensity disturbances will occur and may cause power inverter 1104 toramp down the power output 1116 provided to energy grid 1112preemptively. Instead of reacting to solar intensity disturbances afterthey occur, controller 1114 can actively predict solar intensitydisturbances and preemptively ramp down power output 1116 before thedisturbances affect PV field 1102. Advantageously, this allows systemcontroller 1114 to perform both ramp down control and ramp up control byusing only a portion of the energy provided by PV field 1102 to generatepower output 1116 while the power output of PV field 1102 is still high,rather than relying on energy from a battery. The remainder of theenergy generated by PV field 1102 (i.e., the excess energy) may bestored in battery 1106 and/or dissipated.

In some embodiments, controller 1114 predicts solar intensitydisturbances using input from one or more cloud detectors. The clouddetectors may include an array of solar intensity sensors. The solarintensity sensors may be positioned outside PV field 1102 or within PVfield 1102. Each solar intensity sensor may have a known location. Insome embodiments, the locations of the solar intensity sensors are basedon the geometry and orientation of PV field 1102. For example, if PVfield 1102 is rectangular, more sensors may be placed along its longside than along its short side. A cloud formation moving perpendicularto the long side may cover more area of PV field 1102 per unit time thana cloud formation moving perpendicular to the short side. Therefore, itmay be desirable to include more sensors along the long side to moreprecisely detect cloud movement perpendicular to the long side. Asanother example, more sensors may be placed along the west side of PVfield 1102 than along the east side of PV field 1102 since cloudmovement from west to east is more common than cloud movement from eastto west. The placement of sensors may be selected to detect approachingcloud formations without requiring unnecessary or redundant sensors.

The solar intensity sensors may be configured to measure solar intensityat various locations outside PV field 1102. When the solar intensitymeasured by a particular solar intensity sensor drops below a thresholdvalue, controller 1114 may determine that a cloud is currently casting ashadow on the solar intensity sensor. Controller 1114 may use input frommultiple solar intensity sensors to determine various attributes ofclouds approaching PV field 1102 and/or the shadows produced by suchclouds. For example, if a shadow is cast upon two or more of the solarintensity sensors sequentially, controller 1114 may use the knownpositions of the solar intensity sensors and the time interval betweeneach solar intensity sensor detecting the shadow to determine how fastthe cloud/shadow is moving. If two or more of the solar intensitysensors are within the shadow simultaneously, controller 1114 may usethe known positions of the solar intensity sensors to determine aposition, size, and/or shape of the cloud/shadow.

Although the cloud detectors are described primarily as solar intensitysensors, it is contemplated that the cloud detectors may include anytype of device configured to detect the presence of clouds or shadowscast by clouds. For example, the cloud detectors may include one or morecameras that capture visual images of cloud movement. The cameras may beupward-oriented cameras located below the clouds (e.g., attached to astructure on the Earth) or downward-oriented cameras located above theclouds (e.g., satellite cameras). Images from the cameras may be used todetermine cloud size, position, velocity, and/or other cloud attributes.In some embodiments, the cloud detectors include radar or othermeteorological devices configured to detect the presence of clouds,cloud density, cloud velocity, and/or other cloud attributes. In someembodiments, controller 1114 receives data from a weather service thatindicates various cloud attributes.

Advantageously, controller 1114 may use the attributes of theclouds/shadows to determine when a solar intensity disturbance (e.g., ashadow) is approaching PV field 1102. For example, controller 1114 mayuse the attributes of the clouds/shadows to determine whether any of theclouds are expected to cast a shadow upon PV field 1102. If a cloud isexpected to cast a shadow upon PV field 1102, controller 1114 may usethe size, position, and/or velocity of the cloud/shadow to determine aportion of PV field 1102 that will be affected. The affected portion ofPV field 1102 may include some or all of PV field 1102. Controller 1114may use the attributes of the clouds/shadows to quantify a magnitude ofthe expected solar intensity disturbance (e.g., an expected decrease inpower output from PV field 1102) and to determine a time at which thedisturbance is expected to occur (e.g., a start time, an end time, aduration, etc.).

In some embodiments, controller 1114 predicts a magnitude of thedisturbance for each of a plurality of time steps. Controller 1114 mayuse the predicted magnitudes of the disturbance at each of the timesteps to generate a predicted disturbance profile. The predicteddisturbance profile may indicate how fast power output 1116 is expectedto change as a result of the disturbance. Controller 1114 may comparethe expected rate of change to a ramp rate threshold to determinewhether ramp rate control is required. For example, if power output 1116is predicted to decrease at a rate in excess of the maximum compliantramp rate, controller 1114 may preemptively implement ramp rate controlto gradually decrease power output 1116.

In some embodiments, controller 1114 identifies the minimum expectedvalue of power output 1116 and determines when the predicted poweroutput is expected to reach the minimum value. Controller 1114 maysubtract the minimum expected power output 1116 from the current poweroutput 1116 to determine an amount by which power output 1116 isexpected to decrease. Controller 1114 may apply the maximum allowableramp rate to the amount by which power output 1116 is expected todecrease to determine a minimum time required to ramp down power output1116 in order to comply with the maximum allowable ramp rate. Forexample, controller 1114 may divide the amount by which power output1116 is expected to decrease (e.g., measured in units of power) by themaximum allowable ramp rate (e.g., measured in units of power per unittime) to identify the minimum time required to ramp down power output1116. Controller 1114 may subtract the minimum required time from thetime at which the predicted power output is expected to reach theminimum value to determine when to start preemptively ramping down poweroutput 1116.

Advantageously, controller 1114 may preemptively act upon predicteddisturbances by causing power inverter 1104 to ramp down power output1116 before the disturbances affect PV field 1102. This allows powerinverter 1104 to ramp down power output 1116 by using only a portion ofthe energy generated by PV field 1102 to generate power output 1116(i.e., performing the ramp down while the power output is still high),rather than requiring additional energy from a battery (i.e., performingthe ramp down after the power output has decreased). The remainder ofthe energy generated by PV field 1102 (i.e., the excess energy) may bestored in battery 1106 and/or dissipated.

Referring now to FIG. 14, a graph 1400 illustrating a preemptive ramprate control technique which can be used by controller 1114 is shown,according to an exemplary embodiment. Graph 1400 plots the power outputP provided to energy grid 1112 as a function of time t. The solid line1402 illustrates power output P without any ramp rate control, whereasthe broken line 1404 illustrates power output P with preemptive ramprate control.

Between times t₀ and t₂, power output P is at a high value P_(high). Attime t₂, a cloud begins to cast its shadow on PV field 1102, causing thepower output of PV field 1102 to suddenly decrease, until PV field 1102is completely in shadow at time t₃. Without any ramp rate control, thesudden drop in power output from PV field 1102 causes the power output Pto rapidly drop from P_(high) to a low value P_(low) between times t₂and t₃. However, with preemptive ramp rate control, controller 1114preemptively causes power inverter 1104 to begin ramping down poweroutput P at time t₁, prior to the cloud casting a shadow on PV field1102. The preemptive ramp down occurs between times t₁ and t₃, resultingin a ramp rate that is relatively more gradual. Triangular region 1406represents the energy generated by PV field 1102 in excess of the ramprate limit. The excess energy may be limited by power inverter 1104and/or stored in battery 1106 to gradually decrease power output P at arate no greater than the ramp rate limit.

Between times t₃ and t₄, PV field 1102 is completely in shadow. At timet₄, the shadow cast by the cloud begins to move off PV field 1102,causing the power output of PV field 1102 to suddenly increase, until PVfield 1102 is entirely in sunlight at time t₅. Without any ramp ratecontrol, the sudden increase in power output from PV field 1102 causesthe power output P to rapidly increase to the high value P_(high) attime t₅. However, with ramp rate control, power inverter 1104 uses onlya portion of the energy from PV field 1102 to gradually increase poweroutput P to P_(high) at time t₆. Triangular region 1408 represents theenergy generated by PV field 1102 in excess of the ramp rate limit. Theexcess energy may be limited by power inverter 1104 and/or stored inbattery 1106 to gradually increase power output P at a rate no greaterthan the ramp rate limit.

Notably, a significant portion of triangular region 1406 occurs betweentimes t₁ and t₂, before the disturbance affects PV field 1102. As such,the decreasing ramp rate control provided by system 1100 is a preemptiveprocess triggered by detecting an approaching cloud, prior to the cloudcasting a shadow upon PV field 1102. In some embodiments, controller1114 uses a predictive control technique (e.g., feedforward control,model predictive control, etc.) to perform ramp down control in system1100. For example, controller 1114 may actively monitor the positions,sizes, velocities, and/or other attributes of clouds/shadows that couldpotentially cause a solar intensity disturbance affecting PV field 1102.When an approaching cloud is detected at time t₁, controller 1114 maypreemptively cause power inverter 1104 to begin ramping down poweroutput 1116. This allows power inverter 1104 to ramp down power output1116 by limiting the energy generated by PV field 1102 while the poweroutput is still high, rather than requiring additional energy from abattery to perform the ramp down once the power output has dropped.

Frequency Regulation and Ramp Rate Controller

Referring now to FIG. 15, a block diagram illustrating controller 1114in greater detail is shown, according to an exemplary embodiment.Controller 1114 is shown to include a communications interface 1502 anda processing circuit 1504. Communications interface 1502 may includewired or wireless interfaces (e.g., jacks, antennas, transmitters,receivers, transceivers, wire terminals, etc.) for conducting datacommunications with various systems, devices, or networks. For example,communications interface 1102 may include an Ethernet card and port forsending and receiving data via an Ethernet-based communications networkand/or a WiFi transceiver for communicating via a wirelesscommunications network. Communications interface 1502 may be configuredto communicate via local area networks or wide area networks (e.g., theInternet, a building WAN, etc.) and may use a variety of communicationsprotocols (e.g., BACnet, IP, LON, etc.).

Communications interface 1502 may be a network interface configured tofacilitate electronic data communications between controller 1114 andvarious external systems or devices (e.g., PV field 1102, energy grid1112, PV field power inverter 1104, battery power inverter 1108, etc.).For example, controller 1114 may receive a PV power signal from PV field1102 indicating the current value of the PV power P_(PV) generated by PVfield 1102. Controller 1114 may use the PV power signal to predict oneor more future values for the PV power P_(PV) and generate a ramp ratesetpoint u_(RR). Controller 1114 may receive a grid frequency signalfrom energy grid 1112 indicating the current value of the gridfrequency. Controller 1114 may use the grid frequency to generate afrequency regulation setpoint u_(RR). Controller 1114 may use the ramprate setpoint u_(RR) and the frequency regulation setpoint u_(RR) togenerate a battery power setpoint u_(bat) and may provide the batterypower setpoint u_(bat) to battery power inverter 1108. Controller 1114may use the battery power setpoint u_(bat) to generate a PV powersetpoint u_(PV) and may provide the PV power setpoint u_(PV) to PV fieldpower inverter 1104.

Still referring to FIG. 15, processing circuit 1504 is shown to includea processor 1506 and memory 1508. Processor 1506 may be a generalpurpose or specific purpose processor, an application specificintegrated circuit (ASIC), one or more field programmable gate arrays(FPGAs), a group of processing components, or other suitable processingcomponents. Processor 1506 may be configured to execute computer code orinstructions stored in memory 1508 or received from other computerreadable media (e.g., CDROM, network storage, a remote server, etc.).

Memory 1508 may include one or more devices (e.g., memory units, memorydevices, storage devices, etc.) for storing data and/or computer codefor completing and/or facilitating the various processes described inthe present disclosure. Memory 1508 may include random access memory(RAM), read-only memory (ROM), hard drive storage, temporary storage,non-volatile memory, flash memory, optical memory, or any other suitablememory for storing software objects and/or computer instructions. Memory1508 may include database components, object code components, scriptcomponents, or any other type of information structure for supportingthe various activities and information structures described in thepresent disclosure. Memory 1508 may be communicably connected toprocessor 1506 via processing circuit 1504 and may include computer codefor executing (e.g., by processor 1506) one or more processes describedherein.

Predicting PV Power Output

Still referring to FIG. 15, controller 1114 is shown to include a PVpower predictor 1512. PV power predictor 1512 may receive the PV powersignal from PV field 1102 and use the PV power signal to make a shortterm prediction of the photovoltaic power output P_(PV). In someembodiments, PV power predictor 1512 predicts the value of P_(PV) forthe next time step (i.e., a one step ahead prediction). For example, ateach time step k, PV power predictor 1512 may predict the value of thePV power output P_(PV) for the next time step k+1 (i.e., {circumflexover (P)}_(PV)(k+1)). Advantageously, predicting the next value for thePV power output P_(PV) allows controller 1114 to predict the ramp rateand perform an appropriate control action to prevent the ramp rate fromexceeding the ramp rate compliance limit.

In some embodiments, PV power predictor 1512 performs a time seriesanalysis to predict {circumflex over (P)}(k+1). A time series may bedefined by an ordered sequence of values of a variable at equally spacedintervals. PV power predictor 1512 may model changes between values ofP_(PV) over time using an autoregressive moving average (ARMA) model oran autoregressive integrated moving average (ARIMA) model. PV powerpredictor 1512 may use the model to predict the next value of the PVpower output P_(PV) and correct the prediction using a Kalman filtereach time a new measurement is acquired. The time series analysistechnique is described in greater detail in the following paragraphs.

In some embodiments, PV power predictor 1512 uses a technique in theBox-Jenkins family of techniques to perform the time series analysis.These techniques are statistical tools that use past data (e.g., lags)to predict or correct new data, and other techniques to find theparameters or coefficients of the time series. A general representationof a time series from the Box-Jenkins approach is:

${X_{k} - {\sum\limits_{r = 1}^{p}\; {\phi_{r}X_{k - r}}}} = {\sum\limits_{s = 0}^{q}\; {\theta_{s}\varepsilon_{k - s}}}$

which is known as an ARMA process. In this representation, theparameters p and q define the order and number of lags of the timeseries, φ is an autoregressive parameter, and θ is a moving averageparameter. This representation is desirable for a stationary processwhich has a mean, variance, and autocorrelation structure that does notchange over time. However, if the original process {Y_(k)} representingthe time series values of P_(PV) is not stationary, X_(k) can representthe first difference (or higher order difference) of the process{Y_(k)−Y_(k−1)}. If the difference is stationary, PV power predictor1512 may model the process as an ARIMA process.

PV power predictor 1512 may be configured to determine whether to use anARMA model or an ARIMA model to model the time series of the PV poweroutput P_(PV). Determining whether to use an ARMA model or an ARIMAmodel may include identifying whether the process is stationary. In someembodiments, the power output P_(PV) is not stationary. However, thefirst difference Y_(k)−Y_(k−1) may be stationary. Accordingly, PV powerpredictor 1512 may select an ARIMA model to represent the time series ofP_(PV).

PV power predictor 1512 may find values for the parameters p and q thatdefine the order and the number of lags of the time series. In someembodiments, PV power predictor 1512 finds values for p and q bychecking the partial autocorrelation function (PACF) and selecting anumber where the PACF approaches zero (e.g., p=q). For some time seriesdata, PV power predictor 1512 may determine that a 4^(th) or 5^(th)order model is appropriate. However, it is contemplated that PV powerpredictor 1512 may select a different model order to represent differenttime series processes.

PV power predictor 1512 may find values for the autoregressive parameterφ_(1 . . . p) and the moving average parameter θ_(1 . . . 4). In someembodiments, PV power predictor 1512 uses an optimization algorithm tofind values for φ_(1 . . . p) and θ_(1 . . . q) given the time seriesdata {Y_(k)}. For example, PV power predictor 1512 may generate adiscrete-time ARIMA model of the form:

${{A(z)}{y(k)}} = {\left\lbrack \frac{C(z)}{1 - z^{- 1}} \right\rbrack {e(t)}}$

where A(z) and C(z) are defined as follows:

A(z)=1+φ₁ z ⁻¹+φ₂ z ⁻²+φ₃ z ⁻³+φ₄ z ⁻⁴

C(z)=1+θ₁ z ⁺¹+θ₂ z ⁻²+θ₃ z ⁻³+θ₄ z ⁻⁴

where the values for φ_(1 . . . p) and θ_(1 . . . q) are determined byfitting the model to the time series values of P_(PV).

In some embodiments, PV power predictor 1512 uses the ARIMA model as anelement of a Kalman filter. The Kalman filter may be used by PV powerpredictor 1512 to correct the estimated state and provide tighterpredictions based on actual values of the PV power output P_(PV). Inorder to use the ARIMA model with the Kalman filter, PV power predictor1512 may generate a discrete-time state-space representation of theARIMA model of the form:

x(k+1)=Ax(k)+Ke(k)

y(k)=Cx(k)+e(k)

where y(k) represents the values of the PV power output P_(PV) and e(k)is a disturbance considered to be normal with zero mean and a variancederived from the fitted model. It is contemplated that the state-spacemodel can be represented in a variety of different forms. For example,the ARIMA model can be rewritten as a difference equation and used togenerate a different state-space model using state-space modelingtechniques. In various embodiments, PV power predictor 1512 may use anyof a variety of different forms of the state-space model.

The discrete Kalman filter consists of an iterative process that takes astate-space model and forwards it in time until there are available datato correct the predicted state and obtain a better estimate. Thecorrection may be based on the evolution of the mean and covariance ofan assumed white noise system. For example, PV power predictor 1512 mayuse a state-space model of the following form:

x(k+1)=Ax(k)+Bu(k)+w(k)+w(k)˜N(0,Q)

y(k)=Cx(k)+Du(k)+v(k)+v(k)˜N(0,R)

where N( ) represents a normal distribution, v(k) is the measurementerror having zero mean and variance R, and w(k) is the process errorhaving zero mean and variance Q. The values of R and Q are designchoices. The variable x(k) is a state of the process and the variabley(k) represents the PV power output P_(PV)(k). This representation isreferred to as a stochastic state-space representation.

PV power predictor 1512 may use the Kalman filter to perform aniterative process to predict {circumflex over (P)}_(PV)(k+1) based onthe current and previous values of P_(PV) (e.g., P_(PV)(k), P_(PV)(k−1),etc.). The iterative process may include a prediction step and an updatestep. The prediction step moves the state estimate forward in time usingthe following equations:

{circumflex over (x)} ⁻(k+1)=A*{circumflex over (x)}(k)

P ⁻(k+1)=A*P(k)*A ^(T) +Q

where {circumflex over (x)}(k) is the mean of the process or estimatedstate at time step k and P(k) is the covariance of the process at timestep k. The super index “−” indicates that the estimated state{circumflex over (x)}⁻(k+1) is based on the information known prior totime step k+1 (i.e., information up to time step k). In other words, themeasurements at time step k+1 have not yet been incorporated to generatethe state estimate {circumflex over (x)}⁻(k+1). This is known as an apriori state estimate.

PV power predictor 1512 may predict the PV power output {circumflex over(P)}_(PV) (k+1) by determining the value of the predicted measurementŷ⁻(k+1). As previously described, the measurement y(k) and the statex(k) are related by the following equation:

y(k)=Cx(k)+e(k)

which allows PV power predictor 1512 to predict the measurement ŷ⁻(k+1)as a function of the predicted state {circumflex over (x)}⁻(k+1). PVpower predictor 1512 may use the measurement estimate ŷ⁻(k+1) as thevalue for the predicted PV power output {circumflex over (P)}_(PV)(k+1)(i.e., {circumflex over (P)}_(PV)(k+1)=ŷ⁻(k+1)).

The update step uses the following equations to correct the a prioristate estimate {circumflex over (x)}⁻(k+1) based on the actual(measured) value of y(k+1):

K=P ⁻(k+1)*C ^(T) *[R+C*P ⁻(k+1)*C ^(T)]⁻¹

{circumflex over (x)}(k+1)={circumflex over(x)}(k+1)+K*[y(k+1)C*{circumflex over (x)} ⁻(k+1)]

P(k+1)=P ⁻(k+1)−K*[R+C*P ⁻(k+1)*C ^(T) ]*K ^(T)

where y(k+1) corresponds to the actual measured value of P_(PV)(k+1).The variable {circumflex over (x)}(k+1) represents the a posterioriestimate of the state x at time k+1 given the information known up totime step k+1. The update step allows PV power predictor 1512 to preparethe Kalman filter for the next iteration of the prediction step.

Although PV power predictor 1512 is primarily described as using a timeseries analysis to predict {circumflex over (P)}_(PV)(k+1), it iscontemplated that PV power predictor 1512 may use any of a variety oftechniques to predict the next value of the PV power output P_(PV). Forexample, PV power predictor 1512 may use a deterministic plus stochasticmodel trained from historical PV power output values (e.g., linearregression for the deterministic portion and an AR model for thestochastic portion). This technique is described in greater detail inU.S. patent application Ser. No. 14/717,593, titled “Building ManagementSystem for Forecasting Time Series Values of Building Variables” andfiled May 20, 2015, the entirety of which is incorporated by referenceherein.

In other embodiments, PV power predictor 1512 uses input from clouddetectors (e.g., cameras, light intensity sensors, radar, etc.) topredict when an approaching cloud will cast a shadow upon PV field 1102.When an approaching cloud is detected, PV power predictor 1512 mayestimate an amount by which the solar intensity will decrease as aresult of the shadow and/or increase once the shadow has passed PV field1102. PV power predictor 1512 may use the predicted change in solarintensity to predict a corresponding change in the PV power outputP_(PV). This technique is described in greater detail in U.S.Provisional Patent Application No. 62/239,131 titled “Systems andMethods for Controlling Ramp Rate in a Photovoltaic Energy System” andfiled Oct. 8, 2015, the entirety of which is incorporated by referenceherein. PV power predictor 1512 may provide the predicted PV poweroutput {circumflex over (P)}_(PV) (k+1) to ramp rate controller 1514.

Controlling Ramp Rate

Still referring to FIG. 15, controller 1114 is shown to include a ramprate controller 1514. Ramp rate controller 1514 may be configured todetermine an amount of power to charge or discharge from battery 1106for ramp rate control (i.e., u_(RR)). Advantageously, ramp ratecontroller 1514 may determine a value for the ramp rate power u_(RR)that simultaneously maintains the ramp rate of the PV power (i.e.,u_(RR)+P_(PV)) within compliance limits while allowing controller 1114to regulate the frequency of energy grid 1112 and while maintaining thestate-of-charge of battery 1106 within a predetermined desirable range.

In some embodiments, the ramp rate of the PV power is within compliancelimits as long as the actual ramp rate evaluated over a one minuteinterval does not exceed ten percent of the rated capacity of PV field1102. The actual ramp rate may be evaluated over shorter intervals(e.g., two seconds) and scaled up to a one minute interval. Therefore, aramp rate may be within compliance limits if the ramp rate satisfies oneor more of the following inequalities:

${{rr}} < {\frac{0.1P_{cap}}{30}\left( {1 + {tolerance}} \right)}$RR < 0.1P_(cap)(1 + tolerance)

where rr is the ramp rate calculated over a two second interval, RR isthe ramp rate calculated over a one minute interval, P_(cap) is therated capacity of PV field 1102, and tolerance is an amount by which theactual ramp rate can exceed the compliance limit without resulting in anon-compliance violation (e.g., tolerance=10%). In this formulation, theramp rates rr and RR represent a difference in the PV power (e.g.,measured in kW) at the beginning and end of the ramp rate evaluationinterval.

Simultaneous implementation of ramp rate control and frequencyregulation can be challenging (e.g., can result in non-compliance),especially if the ramp rate is calculated as the difference in the powerP_(POI) at POI 1110. In some embodiments, the ramp rate over a twosecond interval is defined as follows:

rr=[P _(POI)(k)−P _(POI)(k−1)]−[u _(FR)(k)−u _(FR)(k−1)]

where P_(POI)(k−1) and P_(POI)(k) are the total powers at POI 1110measured at the beginning and end, respectively, of a two secondinterval, and u_(FR) (k−1) and u_(FR) (k) are the powers used forfrequency regulation measured at the beginning and end, respectively, ofthe two second interval.

The total power at POI 1110 (i.e., P_(POI)) is the sum of the poweroutput of PV field power inverter 1104 (i.e., u_(PV)) and the poweroutput of battery power inverter 1108 (i.e., u_(bat)=u_(FR) u_(RR)).Assuming that PV field power inverter 1104 is not limiting the powerP_(PV) generated by PV field 1102, the output of PV field power inverter1104 u_(PV) may be equal to the PV power output P_(PV) (i.e.,P_(PV)=u_(PV)) and the total power P_(POI) at POI 1110 can be calculatedusing the following equation:

P _(POI) =P _(PV) +u _(FR) +u _(RR)

Therefore, the ramp rate rr can be rewritten as:

rr=P _(PV)(k)−P _(PV)(k−1)+u _(RR)(k)−u _(RR)(k−1)

and the inequality which must be satisfied to comply with the ramp ratelimit can be rewritten as:

${{{P_{PV}(k)} - {P_{PV}\left( {k - 1} \right)} + {u_{RR}(k)} - {u_{RR}\left( {k - 1} \right)}}} < {\frac{0.1P_{cap}}{30}\left( {1 + {tolerance}} \right)}$

where P_(PV)(k−1) and P_(PV) (k) are the power outputs of PV field 1102measured at the beginning and end, respectively, of the two secondinterval, and u_(RR) (k−1) and u_(RR) (k) are the powers used for ramprate control measured at the beginning and end, respectively, of the twosecond interval.

In some embodiments, ramp rate controller 1514 determines the ramp ratecompliance of a facility based on the number of scans (i.e., monitoredintervals) in violation that occur within a predetermined time period(e.g., one week) and the total number of scans that occur during thepredetermined time period. For example, the ramp rate compliance RRC maybe defined as a percentage and calculated as follows:

${RRC} = {100\left( {1 - \frac{n_{vscan}}{n_{tscan}}} \right)}$

where n_(vscan) is the number of scans over the predetermined timeperiod where rr is in violation and n_(tscan) is the total number ofscans during which the facility is performing ramp rate control duringthe predetermined time period.

In some embodiments, the intervals that are monitored or scanned todetermine ramp rate compliance are selected arbitrarily or randomly(e.g., by a power utility). Therefore, it may be impossible to predictwhich intervals will be monitored. Additionally, the start times and endtimes of the intervals may be unknown. In order to guarantee ramp ratecompliance and minimize the number of scans where the ramp rate is inviolation, ramp rate controller 1514 may determine the amount of poweru_(RR) used for ramp rate control ahead of time. In other words, ramprate controller 1514 may determine, at each instant, the amount of poweru_(RR) to be used for ramp rate control at the next instant. Since thestart and end times of the intervals may be unknown, ramp ratecontroller 1514 may perform ramp rate control at smaller time intervals(e.g., on the order of milliseconds).

Ramp rate controller 1514 may use the predicted PV power {circumflexover (P)}_(PV)(k+1) at instant k+1 and the current PV power P_(PV)(k) atinstant k to determine the ramp rate control power û_(RR) _(T) (k) atinstant k. Advantageously, this allows ramp rate controller 1514 todetermine whether the PV power P_(PV) is in an up-ramp, a down-ramp, orno-ramp at instant k. Assuming a T seconds time resolution, ramp ratecontroller 1514 may determine the value of the power for ramp ratecontrol û_(RR) _(T) (k) at instant k based on the predicted value of thePV power {circumflex over (P)}_(PV)(k+1), the current value of the PVpower P_(PV)(k), and the previous power used for ramp rate controlû_(RR) _(T) (k−1). Scaling to T seconds and assuming a tolerance ofzero, ramp rate compliance is guaranteed if û_(RR) _(T) (k) satisfiesthe following inequality:

lb_(RR) _(T) ≦û _(RR) _(T) ≦ub_(RR) _(T)

where T is the sampling time in seconds, lb_(RR) _(T) is the lower boundon û_(RR) _(T) (k), and ub_(RR) _(T) is the upper bound on û_(RR) _(T)(k).

In some embodiments, the lower bound lb_(RR) _(T) and the upper boundub_(RR) _(T) are defined as follows:

${lb}_{{RR}_{T}} = {{- \left( {{{\hat{P}}_{PV}\left( {k + 1} \right)} - {P_{PV}(k)}} \right)} + {{\hat{u}}_{{RR}_{T}}\left( {k - 1} \right)} - \frac{0.1P_{cap}}{60/T} + {\lambda\sigma}}$${ub}_{{RR}_{T}} = {{- \left( {{{\hat{P}}_{PV}\left( {k + 1} \right)} - {P_{PV}(k)}} \right)} + {{\hat{u}}_{{RR}_{T}}\left( {k - 1} \right)} + \frac{0.1P_{cap}}{60/T} - {\lambda\sigma}}$

where σ is the uncertainty on the PV power prediction and λ is a scalingfactor of the uncertainty in the PV power prediction. Advantageously,the lower bound lb_(RR) _(T) and the upper bound ub_(RR) _(T) provide arange of ramp rate power û_(RR) _(T) (k) that guarantees compliance ofthe rate of change in the PV power.

In some embodiments, ramp rate controller 1514 determines the ramp ratepower û_(RR) _(T) (k) based on whether the PV power P_(PV) is in anup-ramp, a down-ramp, or no-ramp (e.g., the PV power is not changing orchanging at a compliant rate) at instant k. Ramp rate controller 1514may also consider the state-of-charge (SOC) of battery 1106 whendetermining û_(RR) _(T) (k) Exemplary processes which may be performedby ramp rate controller 1514 to generate values for the ramp rate powerû_(RR) _(T) (k) are described in detail in U.S. Patent Application No.62/239,245. Ramp rate controller 1514 may provide the ramp rate powersetpoint û_(RR) _(T) (k) to battery power setpoint generator 1518 foruse in determining the battery power setpoint u_(bat).

Controlling Frequency Regulation

Referring again to FIG. 15, controller 1114 is shown to include afrequency regulation controller 1516. Frequency regulation controller1516 may be configured to determine an amount of power to charge ordischarge from battery 1106 for frequency regulation (i.e., u_(FR)).Frequency regulation controller 1516 is shown receiving a grid frequencysignal from energy grid 1112. The grid frequency signal may specify thecurrent grid frequency f_(grid) of energy grid 1112. In someembodiments, the grid frequency signal also includes a scheduled ordesired grid frequency f_(s) to be achieved by performing frequencyregulation. Frequency regulation controller 1516 may determine thefrequency regulation setpoint u_(FR) based on the difference between thecurrent grid frequency f_(grid) and the scheduled frequency f_(s).

In some embodiments, the range within which the grid frequency f_(grid)is allowed to fluctuate is determined by an electric utility. Anyfrequencies falling outside the permissible range may be corrected byperforming frequency regulation. Facilities participating in frequencyregulation may be required to supply or consume a contracted power forpurposes of regulating grid frequency f_(grid) (e.g., up to 10% of therated capacity of PV field 1102 per frequency regulation event).

In some embodiments, frequency regulation controller 1516 performsfrequency regulation using a dead-band control technique with a gainthat is dependent upon the difference f_(e) between the scheduled gridfrequency f_(s) and the actual grid frequency f_(grid) (i.e.,f_(e)=f_(s)−f_(grid)) and an amount of power required for regulating agiven deviation amount of frequency error f_(e). Such a controltechnique is expressed mathematically by the following equation:

u _(FR)(k)=min(max(lb_(FR),α),ub_(FR))

where lb_(FR) and ub_(FR) are the contracted amounts of power up towhich power is to be consumed or supplied by a facility. lb_(FR) andub_(FR) may be based on the rated capacity P_(cap) of PV field 1102 asshown in the following equations:

lb_(FR)=0.1×P _(cap)

ub_(FR)=0.1×P _(cap)

The variable α represents the required amount of power to be supplied orconsumed from energy grid 1112 to offset the frequency error f_(e). Insome embodiments, frequency regulation controller 1516 calculates ausing the following equation:

α=K _(FR)×sign(f _(e))×max(|f _(e) |−d _(band),0)

where d_(band) is the threshold beyond which a deviation in gridfrequency must be regulated and K_(FR) is the control gain. In someembodiments, frequency regulation controller 1516 calculates the controlgain K_(FR) as follows:

$K_{FR} = \frac{P_{cap}}{0.01 \times {droop} \times f_{s}}$

where droop is a parameter specifying a percentage that defines how muchpower must be supplied or consumed to offset a 1 Hz deviation in thegrid frequency. Frequency regulation controller 1516 may calculate thefrequency regulation setpoint u_(FR) using these equations and mayprovide the frequency regulation setpoint to battery power setpointgenerator 1518.

Generating Battery Power Setpoints

Still referring to FIG. 15, controller 1114 is shown to include abattery power setpoint generator 1518. Battery power setpoint generator1518 may be configured to generate the battery power setpoint u_(bat)for battery power inverter 1108. The battery power setpoint u_(bat) isused by battery power inverter 1108 to control an amount of power drawnfrom battery 1106 or stored in battery 1106. For example, battery powerinverter 1108 may draw power from battery 1106 in response to receivinga positive battery power setpoint u_(bat) from battery power setpointgenerator 1518 and may store power in battery 1106 in response toreceiving a negative battery power setpoint u_(bat) from battery powersetpoint generator 1518.

Battery power setpoint generator 1518 is shown receiving the ramp ratepower setpoint u_(RR) from ramp rate controller 1514 and the frequencyregulation power setpoint u_(FR) from frequency regulation controller1516. In some embodiments, battery power setpoint generator 1518calculates a value for the battery power setpoint u_(bat) by adding theramp rate power setpoint u_(RR) and the frequency response powersetpoint u_(FR). For example, battery power setpoint generator 1518 maycalculate the battery power setpoint u_(bat) using the followingequation:

u _(bat) =u _(RR) +u _(FR)

In some embodiments, battery power setpoint generator 1518 adjusts thebattery power setpoint u_(bat) based on a battery power limit forbattery 1106. For example, battery power setpoint generator 1518 maycompare the battery power setpoint u_(bat) with the battery power limitbattPowerLimit. If the battery power setpoint is greater than thebattery power limit (i.e., u_(bat)>battPowerLimit), battery powersetpoint generator 1518 may replace the battery power setpoint u_(bat)with the battery power limit. Similarly, if the battery power setpointis less than the negative of the battery power limit (i.e.,u_(bat)<−battPowerLimit), battery power setpoint generator 1518 mayreplace the battery power setpoint u_(bat) with the negative of thebattery power limit.

In some embodiments, battery power setpoint generator 1518 causesfrequency regulation controller 1516 to update the frequency regulationsetpoint u_(FR) in response to replacing the battery power setpointu_(bat) with the battery power limit battPowerLimit or the negative ofthe battery power limit −battPowerLimit. For example, if the batterypower setpoint u_(bat) is replaced with the positive battery power limitbattPowerLimit, frequency regulation controller 1516 may update thefrequency regulation setpoint Li_(pp) using the following equation:

u _(FR)(k)=battPowerLimit−û _(RR) _(T) (k)

Similarly, if the battery power setpoint u_(bat) is replaced with thenegative battery power limit −battPowerLimit, frequency regulationcontroller 1516 may update the frequency regulation setpoint u_(FR)using the following equation:

u _(FR)(k)=−battPowerLimit−û _(RR) _(T) (k)

These updates ensure that the amount of power used for ramp rate controlu_(RR) _(T) (k) and the amount of power used for frequency regulationu_(FR)(k) can be added together to calculate the battery power setpointu_(bat). Battery power setpoint generator 1518 may provide the batterypower setpoint u_(bat) to battery power inverter 1108 and to PV powersetpoint generator 1520.

Generating PV Power Setpoints

Still referring to FIG. 15, controller 1114 is shown to include a PVpower setpoint generator 1520. PV power setpoint generator 1520 may beconfigured to generate the PV power setpoint u_(PV) for PV field powerinverter 1104. The PV power setpoint u_(PV) is used by PV field powerinverter 1104 to control an amount of power from PV field 1102 toprovide to POI 1110.

In some embodiments, PV power setpoint generator 1520 sets a default PVpower setpoint u_(PV)(k) for instant k based on the previous value ofthe PV power P_(PV)(k−1) at instant k−1. For example, PV power setpointgenerator 1520 may increment the previous PV power P_(PV)(k−1) with thecompliance limit as shown in the following equation:

${u_{PV}(k)} = {{P_{PV}\left( {k - 1} \right)} + \frac{0.1P_{cap}}{60/T} - {\lambda\sigma}}$

This guarantees compliance with the ramp rate compliance limit andgradual ramping of the PV power output to energy grid 1112. The defaultPV power setpoint may be useful to guarantee ramp rate compliance whenthe system is turned on, for example, in the middle of a sunny day orwhen an up-ramp in the PV power output P_(PV) is to be handled bylimiting the PV power at PV power inverter 1104 instead of chargingbattery 1106.

In some embodiments, PV power setpoint generator 1520 updates the PVpower setpoint u_(PV)(k) based on the value of the battery powersetpoint u_(bat)(k) so that the total power provided to POI 1110 doesnot exceed a POI power limit. For example, PV power setpoint generator1520 may use the PV power setpoint u_(PV)(k) and the battery powersetpoint u_(bat)(k) to calculate the total power P_(POI)(k) at point ofintersection 1110 using the following equation:

P _(POI)(k)=u _(bat)(k)+u _(PV)(k)

PV power setpoint generator 1520 may compare the calculated powerP_(POI)(k) with a power limit for POI 1110 (i.e., POIPowerLimit). If thecalculated power P_(POI)(k) exceeds the POI power limit (i.e.,P_(POI)(k)>POIPowerLimit), PV power setpoint generator 1520 may replacethe calculated power P_(POI)(k) with the POI power limit. PV powersetpoint generator 1520 may update the PV power setpoint u_(PV)(k) usingthe following equation:

u _(PV)(k)=POIPowerLimit−u _(bat)(k)

This ensures that the total power provided to POI 1110 does not exceedthe POI power limit by causing PV field power inverter 1104 to limit thePV power. PV power setpoint generator 1520 may provide the PV powersetpoint u_(PV) to PV field power inverter 1104.

Frequency Response Control System

Referring now to FIG. 16, a block diagram of a frequency responsecontrol system 1600 is shown, according to exemplary embodiment. Controlsystem 1600 is shown to include frequency response controller 112, whichmay be the same or similar as previously described. For example,frequency response controller 112 may be configured to perform anoptimization process to generate values for the bid price, thecapability bid, and the midpoint b. In some embodiments, frequencyresponse controller 112 generates values for the bids and the midpoint bperiodically using a predictive optimization scheme (e.g., once everyhalf hour, once per frequency response period, etc.). Frequency responsecontroller 112 may also calculate and update power setpoints for powerinverter 106 periodically during each frequency response period (e.g.,once every two seconds). As shown in FIG. 16, frequency responsecontroller 112 is in communication with one or more external systems viacommunication interface 1602. Additionally, frequency responsecontroller 112 is also shown as being in communication with a batterysystem 1604.

In some embodiments, the interval at which frequency response controller112 generates power setpoints for power inverter 106 is significantlyshorter than the interval at which frequency response controller 112generates the bids and the midpoint b. For example, frequency responsecontroller 112 may generate values for the bids and the midpoint b everyhalf hour, whereas frequency response controller 112 may generate apower setpoint for power inverter 106 every two seconds. The differencein these time scales allows frequency response controller 112 to use acascaded optimization process to generate optimal bids, midpoints b, andpower setpoints.

In the cascaded optimization process, high level controller 312determines optimal values for the bid price, the capability bid, and themidpoint b by performing a high level optimization. The high levelcontroller 312 may be a centralized server within the frequency responsecontroller 112. The high level controller 312 may be configured toexecute optimization control algorithms, such as those described herein.In one embodiment, the high level controller 312 may be configured torun an optimization engine, such as a MATLAB optimization engine.

Further, the cascaded optimization process allows for multiplecontrollers to process different portions of the optimization process.As will be described below, the high level controller 312 may be used toperform optimization functions based on received data, while a low levelcontroller 314 may receive optimization data from the high levelcontroller 312 and control the battery system 1604 accordingly. Byallowing independent platforms to perform separation portions of theoptimization, the individual platforms may be scaled and tunedindependently. For example, the controller 112 may be able to be scaledup to accommodate a larger battery system 1604 by adding additional lowlevel controllers to control the battery system 1604. Further, the highlevel controller 312 may be modified to provide additional computingpower for optimizing battery system 1604 in more complex systems.Further, modifications to either the high level controller 312 or thelow level controller 314 will not affect the other, thereby increasingoverall system stability and availability.

In system 1600, high level controller 312 may be configured to performsome or all of the functions previously described with reference toFIGS. 3-4. For example, high level controller 312 may select midpoint bto maintain a constant state-of-charge in battery 108 (i.e., the samestate-of-charge at the beginning and end of each frequency responseperiod) or to vary the state-of-charge in order to optimize the overallvalue of operating system 1600 (e.g., frequency response revenue minusenergy costs and battery degradation costs), as described below. Highlevel controller 312 may also determine filter parameters for a signalfilter (e.g., a low pass filter) used by a low level controller 314.

The low level controller 314 may be a standalone controller. In oneembodiment, the low level controller 314 is a Network Automation Engine(NAE) controller from Johnson Controls. However, other controllershaving the required capabilities are also contemplated. The requiredcapabilities for the low level controller 314 may include havingsufficient memory and computing power to run the applications, describedbelow, at the required frequencies. For example, certain optimizationcontrol loops (described below) may require control loops running at 200ms intervals. However, intervals of more than 200 ms and less than 200ms may also be required. These control loops may require reading andwriting data to and from the battery inverter. The low level controller314 may also be required to support Ethernet connectivity (or othernetwork connectivity) to connect to a network for receiving bothoperational data, as well as configuration data. The low levelcontroller 314 may be configured to perform some or all of the functionspreviously described with reference to FIGS. 3-5.

The low level controller 314 may be capable of quickly controlling oneor more devices around one or more setpoints. For example, low levelcontroller 314 uses the midpoint b and the filter parameters from highlevel controller 312 to perform a low level optimization in order togenerate the power setpoints for power inverter 106. Advantageously, lowlevel controller 314 may determine how closely to track the desiredpower P_(POI) ^(*) at the point of interconnection 110. For example, thelow level optimization performed by low level controller 314 mayconsider not only frequency response revenue but also the costs of thepower setpoints in terms of energy costs and battery degradation. Insome instances, low level controller 314 may determine that it isdeleterious to battery 108 to follow the regulation exactly and maysacrifice a portion of the frequency response revenue in order topreserve the life of battery 108.

Low level controller 314 may also be configured to interface with one ormore other devises or systems. For example, the low level controller 314may communicate with the power inverter 106 and/or the batterymanagement unit 1610 via a low level controller communication interface1612. Communications interface 1612 may include wired or wirelessinterfaces (e.g., jacks, antennas, transmitters, receivers,transceivers, wire terminals, etc.) for conducting data communicationswith various systems, devices, or networks. For example, communicationsinterface 1612 may include an Ethernet card and port for sending andreceiving data via an Ethernet-based communications network and/or aWiFi transceiver for communicating via a wireless communicationsnetwork. Communications interface 1612 may be configured to communicatevia local area networks or wide area networks (e.g., the Internet, abuilding WAN, etc.) and may use a variety of communications protocols(e.g., BACnet, MODBUS, CAN, IP, LON, etc.).

As described above, the low level controller 314 may communicatesetpoints to the power inverter 106. Furthermore, the low levelcontroller 314 may receive data from the battery management unit 1610via the communication interface 1612. The battery management unit 1610may provide data relating to a state of charge (SOC) of the batteries108. The battery management unit 1610 may further provide data relatingto other parameters of the batteries 108, such as temperature, real timeor historical voltage level values, real time or historical currentvalues, etc. The low level controller 314 may be configured to performtime critical functions of the frequency response controller 112. Forexample, the low level controller 314 may be able to perform fast loop(PID, PD, PI, etc.) controls in real time.

The low level controller 314 may further control a number of othersystems or devices associated with the battery system 1604. For example,the low level controller may control safety systems 1616 and/orenvironmental systems 1618. In one embodiment, the low level controller314 may communicate with and control the safety systems 1616 and/or theenvironmental systems 1618 through an input/output module (TOM) 1619. Inone example, the IOM may be an TOM controller from Johnson Controls. TheIOM may be configured to receive data from the low level controller andthen output discrete control signals to the safety systems 1616 and/orenvironmental systems 1618. Further, the IOM 1619 may receive discreteoutputs from the safety systems 1616 and/or environmental systems 320,and report those values to the low level controller 314. For example,the TOM 1619 may provide binary outputs to the environmental system1618, such as a temperature setpoint; and in return may receive one ormore analog inputs corresponding to temperatures or other parametersassociated with the environmental systems 1618. Similarly, the safetysystems 1616 may provide binary inputs to the TOM 1619 indicating thestatus of one or more safety systems or devices within the batterysystem 1604. The IOM 1619 may be able to process multiple data pointsfrom devices within the battery system 1604. Further, the TOM may beconfigured to receive and output a variety of analog signals (4-20 mA,0-5V, etc.) as well as binary signals.

The environmental systems 1618 may include HVAC devices such as roof-topunits (RTUs), air handling units (AHUs), etc. The environmental systems1618 may be coupled to the battery system 1604 to provide environmentalregulation of the battery system 1604. For example, the environmentalsystems 1618 may provide cooling for the battery system 1604. In oneexample, the battery system 1604 may be contained within anenvironmentally sealed container. The environmental systems 1618 maythen be used to not only provide airflow through the battery system1604, but also to condition the air to provide additional cooling to thebatteries 108 and/or the power inverter 106. The environmental systems1618 may also provide environmental services such as air filtration,liquid cooling, heating, etc. The safety systems 1616 may providevarious safety controls and interlocks associated with the batterysystem 1604. For example, the safety systems 1616 may monitor one ormore contacts associated with access points on the battery system. Wherea contact indicates that an access point is being accessed, the safetysystems 1616 may communicate the associated data to the low levelcontroller 314 via the TOM 1619. The low level controller may thengenerate and alarm and/or shut down the battery system 1604 to preventany injury to a person accessing the battery system 1604 duringoperation. Further examples of safety systems can include air qualitymonitors, smoke detectors, fire suppression systems, etc.

Still referring to FIG. 16, the frequency response controller 112 isshown to include the high level controller communications interface1602. Communications interface 1602 may include wired or wirelessinterfaces (e.g., jacks, antennas, transmitters, receivers,transceivers, wire terminals, etc.) for conducting data communicationswith various systems, devices, or networks. For example, communicationsinterface 1602 may include an Ethernet card and port for sending andreceiving data via an Ethernet-based communications network and/or aWiFi transceiver for communicating via a wireless communicationsnetwork. Communications interface 1602 may be configured to communicatevia local area networks or wide area networks (e.g., the Internet, abuilding WAN, etc.) and may use a variety of communications protocols(e.g., BACnet, IP, LON, etc.).

Communications interface 1602 may be a network interface configured tofacilitate electronic data communications between frequency responsecontroller 112 and various external systems or devices (e.g., campus102, energy grid 104, incentive provider 114, utilities 320, weatherservice 322, etc.). For example, frequency response controller 112 mayreceive inputs from incentive provider 114 indicating an incentive eventhistory (e.g., past clearing prices, mileage ratios, participationrequirements, etc.) and a regulation signal. Further, the incentiveprovider 114 may communicate utility rates provided by utilities 320.Frequency response controller 112 may receive a campus power signal fromcampus 102, and weather forecasts from weather service 322 viacommunications interface 1602. Frequency response controller 112 mayprovide a price bid and a capability bid to incentive provider 114 andmay provide power setpoints to power inverter 106 via communicationsinterface 1602.

Data Fusion

Turning now to FIG. 17, a block diagram illustrating data flow into thedata fusion module 428 is shown, according to some embodiments. As shownin FIG. 17, the data fusion module 428 may receive data from multipledevices and/or systems. In one embodiment, the data fusion module 428may receive all data received by the high level controller 312. Forexample, the data fusion module 428 may receive campus data from thecampus 102. Campus data may include campus power requirements, campuspower requests, occupancy planning, historical use data, lightingschedules, HVAC schedules, etc. In a further embodiment, the data fusionmodule 428 may receive weather data from the weather service 322. Theweather service 322 may include current weather data (temperature,humidity, barometric pressure, etc.), weather forecasts, historicalweather data, etc. In a still further embodiment, the data fusion module428 may receive utility data from the utilities 320. In some examples,the data fusion module 428 may receive some or all of the utility datavia the incentive provider 114. Examples of utility data may includeutility rates, future pricing schedules, anticipated loading, historicaldata, etc. Further, the incentive provider 114 may further add data suchas capability bid requests, price bid requests, incentive data, etc.

The data fusion module 428 may further receive data from the low levelcontroller 314. In some embodiments, the low level controller mayreceive data from multiple sources, which may be referred tocollectively as battery system data. For example, the low levelcontroller 314 may receive inverter data from power inverter 106.Example inverter data may include inverter status, feedback points,inverter voltage and current, power consumption, etc. The low levelcontroller 314 may further receive battery data from the batterymanagement unit 1610. Example battery data may include battery SOC,depth of discharge data, battery temperature, battery cell temperatures,battery voltage, historical battery use data, battery health data, etc.In other embodiment, the low level controller 314 may receiveenvironmental data from the environmental systems 1618. Examples ofenvironmental data may include battery system temperature, batterysystem humidity, current HVAC settings, setpoint temperatures,historical HVAC data, etc. Further, the low level controller 314 mayreceive safety system data from the safety systems 1616. Safety systemdata may include access contact information (e.g. open or closedindications), access data (e.g. who has accessed the battery system 1604over time), alarm data, etc. In some embodiments, some or all of thedata provided to the low level controller 314 is via an input/outputmodule, such as TOM 1619. For example, the safety system data and theenvironmental system data may be provided to the low level controller314 via an input/output module, as described in detail in regards toFIG. 16.

The low level controller 314 may then communicate the battery systemdata to the data fusion module 428 within the high level controller 312.Additionally, the low level controller 314 may provide additional datato the data fusion module 428, such as setpoint data, controlparameters, etc.

The data fusion module 428 may further receive data from otherstationary power systems, such as a photovoltaic system 1702. Forexample, the photovoltaic system 1702 may include one or morephotovoltaic arrays and one or more photovoltaic array power inverters.The photovoltaic system 1702 may provide data to the data fusion module428 such as photovoltaic array efficiency, photovoltaic array voltage,photovoltaic array inverter output voltage, photovoltaic array inverteroutput current, photovoltaic array inverter temperature, etc. In someembodiments, the photovoltaic system 1702 may provide data directly tothe data fusion module 428 within the high level controller 312. Inother embodiments, the photovoltaic system 1702 may transmit the data tothe low level controller 314, which may then provide the data to thedata fusion module 428 within the high level controller 312.

The data fusion module 428 may receive some or all of the data describedabove, and aggregate the data for use by the high level controller 312.In one embodiment, the data fusion module 428 is configured to receiveand aggregate all data received by the high level controller 312, and tosubsequently parse and distribute the data to one or more modules of thehigh level controller 312, as described above. Further, the data fusionmodule 428 may be configured to combine disparate heterogeneous datafrom the multiple sources described above, into a homogeneous datacollection for use by the high level controller 312. As described above,data from multiple inputs is required to optimize the battery system1604, and the data fusion module 428 can gather and process the datasuch that it can be provided to the modules of the high level controller312 efficiently and accurately. For example, extending battery lifespanis critical for ensuring proper utilization of the battery system 1604.By combining battery data such as temperature and voltage, along withexternal data such as weather forecasts, remaining battery life may bemore accurately determined by the battery degradation estimator 418,described above. Similarly, multiple data points from both externalsources and the battery system 1604 may allow for more accurate midpointestimations, revenue loss estimations, battery power loss estimation, orother optimization determination, as described above.

Turning now to FIG. 18, a block diagram showing a database schema 1800of the system 1600 is shown, according to some embodiments. The schema1800 is shown to include an algorithm run data table 1802, a data pointdata table 1804, an algorithm_run time series data table 1808 and apoint time series data table 1810. The data tables 1802, 1804, 1808,1810 may be stored on the memory of the high level controller 312. Inother embodiments, the data tables 1802, 1804, 1808, 1810 may be storedon an external storage device and accessed by the high level controlleras required.

As described above, the high level controller performs calculation togenerate optimization data for the battery optimization system 1600.These calculation operations (e.g. executed algorithms) may be referredto as “runs.” As described above, one such run is the generation of amidpoint b which can subsequently be provided to the low levelcontroller 314 to control the battery system 1604. However, other typesof runs are contemplated. Thus, for the above described run, themidpoint b is the output of the run. The detailed operation of a run,and specifically a run to generate midpoint b is described in detailabove.

The algorithm run data table 1802 may include a number of algorithm runattributes 1812. Algorithm run attributes 1812 are those attributesassociated with the high level controller 312 executing an algorithm, or“run”, to produce an output. The runs can be performed at selectedintervals of time. For example, the run may be performed once everyhour. However, in other examples, the run may be performed more thanonce every hour, or less than once every hour. The run is then performedand by the high level controller 312 and a data point is output, forexample a midpoint b, as described above. The midpoint b may be providedto the low level controller 314 to control the battery system 1604,described above in the description of the high level controller 1604calculating the midpoint b.

In one embodiment, the algorithm run attributes contain all theinformation necessary to perform the algorithm or run. In a furtherembodiment, the algorithm run attributes 1812 are associated with thehigh level controller executing an algorithm to generate a midpoint,such as midpoint b described in detail above. Example algorithm runattributes may include an algorithm run key, an algorithm run ID (e.g.“midpoint,” “endpoint,” “temperature_setpoint,” etc.), Associated Run ID(e.g. name of the run), run start time, run stop time, target run time(e.g. when is the next run desired to start), run status, run reason,fail reason, plant object ID (e.g. name of system), customer ID, runcreator ID, run creation date, run update ID, and run update date.However, this list is for example only, as it is contemplated that thealgorithm run attributes may contain multiple other attributesassociated with a given run.

As stated above, the algorithm run data table 1802 contains attributesassociated with a run to be performed by the high level controller 312.In some embodiments, the output of a run, is one or more “points,” suchas a midpoint. The data point data table 1804 contains data pointattributes 1814 associated with various points that may be generated bya run. These data point attributes 1814 are used to describe thecharacteristics of the data points. For example, the data pointattributes may contain information associated with a midpoint datapoint. However, other data point types are contemplated. Exampleattributes may include point name, default precision (e.g. number ofsignificant digits), default unit (e.g. cm, degrees Celsius, voltage,etc.), unit type, category, fully qualified reference (yes or no),attribute reference ID, etc. However, other attributes are furtherconsidered.

The algorithm_run time series data table 1808 may contain time seriesdata 1816 associated with a run. In one embodiment, the algorithm_runtime series data 1816 includes time series data associated with aparticular algorithm_run ID. For example, a run associated withdetermining the midpoint b described above, may have an algorithm_run IDof Midpoint_Run. The algorithm_run time series data table 1808 maytherefore include algorithm_run time series data 1816 for all runsperformed under the algorithm ID Midpoint_Run. Additionally, thealgorithm_run time series data table 1808 may also contain run timeseries data associated with other algorithm IDs as well. The run timeseries data 1816 may include past data associated with a run, as well asexpected future information. Example run time series data 1816 mayinclude final values of previous runs, the unit of measure in theprevious runs, previous final value reliability values, etc. As anexample, a “midpoint” run may be run every hour, as described above. Thealgorithm_run time series data 1816 may include data related to thepreviously performed runs, such as energy prices over time, system data,etc. Additionally, the algorithm_run time series data 1816 may includepoint time series data associated with a given point, as describedbelow.

The point time series data table 1810 may include the point time seriesdata 1818. The point time series data 1818 may include time series dataassociated with a given data “point.” For example, the above describedmidpoint b may have a point ID of “Midpoint.” The point time series datatable 1810 may contain point time series data 1818 associated with the“midpoint” ID, generated over time. For example, previous midpointvalues may be stored in the point time series data table 1818 for eachperformed run. The point time series data table 1810 may identify theprevious midpoint values by time (e.g. when the midpoint was used by thelow level controller 314), and may include information such as themidpoint value, reliability information associated with the midpoint,etc. In one embodiment, the point time series data table 1818 may beupdated with new values each time a new “midpoint” is generated via arun. Further, the point time series data 1816 for a given point mayinclude information independent of a given run. For example, the highlevel controller 312 may monitor other data associated with themidpoint, such as regulation information from the low level controller,optimization data, etc., which may further be stored in the point timeseries data table 1810 as point time series data 1818.

The above described data tables may be configured to have an associationor relational connection between them. For example, as shown in FIG. 18,the algorithm_run data table 1802 may have a one-to-many association orrelational relationship with the algorithm_run time series associationtable 1808, as there may be many algorithm_run time series data points1816 for each individual algorithm_run ID. Further, the data point datatable 1804 may have a one-to many relationship with the point timeseries data table 1810, as there may be many point time series datapoints 1818 associated with an individual point. Further, the point timeseries data table 1810 may have a one to many relationship with thealgorithm_run time series data table 1808, as there may be multipledifferent point time series data 1818 associated with a run.Accordingly, the algorithm_run data table 1802 has a many-to-manyrelationship with the data point data table 1804, as there may be manypoints, and/or point time series data 1818, associated with may runtypes; and, there may be multiple run types associated with many points

By using the above mentioned association data tables 1802, 1804, 1808,1810, optimization of storage space required for storing time seriesdata may be achieved. With the addition of additional data used in abattery optimization system, such as battery optimization system 1600described above, vast amounts of time series data related to dataprovided by external sources (weather data, utility data, campus data,building automation systems (BAS) or building management systems (BMS)),and internal sources (battery systems, photovoltaic systems, etc.) isgenerated. By utilizing association data tables, such as those describedabove, the data may be optimally stored and accessed.

Configuration of Exemplary Embodiments

The construction and arrangement of the systems and methods as shown inthe various exemplary embodiments are illustrative only. Although only afew embodiments have been described in detail in this disclosure, manymodifications are possible (e.g., variations in sizes, dimensions,structures, shapes and proportions of the various elements, values ofparameters, mounting arrangements, use of materials, colors,orientations, etc.). For example, the position of elements may bereversed or otherwise varied and the nature or number of discreteelements or positions may be altered or varied. Accordingly, all suchmodifications are intended to be included within the scope of thepresent disclosure. The order or sequence of any process or method stepsmay be varied or re-sequenced according to alternative embodiments.Other substitutions, modifications, changes, and omissions may be madein the design, operating conditions and arrangement of the exemplaryembodiments without departing from the scope of the present disclosure.

The present disclosure contemplates methods, systems and programproducts on any machine-readable media for accomplishing variousoperations. The embodiments of the present disclosure may be implementedusing existing computer processors, or by a special purpose computerprocessor for an appropriate system, incorporated for this or anotherpurpose, or by a hardwired system. Embodiments within the scope of thepresent disclosure include program products comprising machine-readablemedia for carrying or having machine-executable instructions or datastructures stored thereon. Such machine-readable media can be anyavailable media that can be accessed by a general purpose or specialpurpose computer or other machine with a processor. By way of example,such machine-readable media can comprise RAM, ROM, EPROM, EEPROM, CD-ROMor other optical disk storage, magnetic disk storage or other magneticstorage devices, or any other medium which can be used to carry or storedesired program code in the form of machine-executable instructions ordata structures and which can be accessed by a general purpose orspecial purpose computer or other machine with a processor. Combinationsof the above are also included within the scope of machine-readablemedia. Machine-executable instructions include, for example,instructions and data which cause a general purpose computer, specialpurpose computer, or special purpose processing machines to perform acertain function or group of functions.

Although the figures show a specific order of method steps, the order ofthe steps may differ from what is depicted. Also two or more steps maybe performed concurrently or with partial concurrence. Such variationwill depend on the software and hardware systems chosen and on designerchoice. All such variations are within the scope of the disclosure.Likewise, software implementations could be accomplished with standardprogramming techniques with rule based logic and other logic toaccomplish the various connection steps, processing steps, comparisonsteps and decision steps.

What is claimed is:
 1. A frequency response optimization systemcomprising: a battery configured to store and discharge electric power;a power inverter configured to use battery power setpoints to control anamount of the electric power stored or discharged from the battery; anda frequency response controller configured to: receive a regulationsignal from an incentive provider, predict future values of theregulation signal, and use the predicted values of the regulation signalto generate the battery power setpoints for the power inverter.
 2. Thesystem of claim 1, wherein the frequency response controller isconfigured to use an autoregressive model to predict the future valuesof the regulation signal based on a history of past values of theregulation signal.
 3. The system of claim 1, wherein the frequencyresponse controller comprises a low pass filter configured to filter thepredicted values of the regulation signal; wherein the frequencyresponse controller is configured to use the filtered values of theregulation signal to generate the battery power setpoints.
 4. The systemof claim 1, wherein the frequency response controller is configured togenerate an objective function comprising: an estimated amount offrequency response revenue that will result from the battery powersetpoints; and an estimated cost of battery degradation that will resultfrom the battery power setpoints.
 5. The system of claim 4, wherein thefrequency response controller is configured to: use dynamic programmingto select scaling coefficients for the regulation signal; and adjust thescaling coefficients to achieve an optimal value for the objectivefunction.
 6. The system of claim 1, wherein the frequency responsecontroller is configured to: calculate a frequency response performancescore that will result from the battery power setpoints; and use thefrequency response performance score to estimate an amount of frequencyresponse revenue that will result from the battery power setpoints. 7.The system of claim 1, wherein the frequency response controller isconfigured to: use a battery life model to estimate an amount of batterydegradation that will result from the battery power setpoints; and usethe estimated amount of battery degradation to determine a cost of thebattery degradation.
 8. The system of claim 7, wherein the battery lifemodel comprises a plurality of variables that depend on the batterypower setpoints, the variables comprising at least one of: a temperatureof the battery; a state of charge of the battery; a depth of dischargeof the battery; a power ratio of the battery; and an effort ratio of thebattery.
 9. The system of claim 1, wherein the frequency responsecontroller comprises: a high level controller configured to generatefilter parameters based on the predicted values of the regulationsignal; and a low level controller configured to use the filterparameters to filter the predicted regulation signal and determine theoptimal battery power setpoints using the filtered regulation signal.10. The system of claim 1, further comprising a campus having a campuspower usage and a point of intersection at which the campus power usagecombines with the electric power discharged from the battery; whereinthe frequency response controller is configured to determine the optimalbattery power setpoints based on both the campus power usage and thefrequency response signal.
 11. A method for generating battery powersetpoints in a frequency response optimization system, the methodcomprising: receiving a frequency regulation signal from an incentiveprovider; predicting future values of the frequency regulation signal;using the predicted values of the frequency regulation signal togenerate battery power setpoints; providing the battery power setpointsto a power inverter; and using the battery power setpoints to control anamount of electric power stored or discharged by the battery in responseto the frequency response signal.
 12. The method of claim 11, whereinpredicting future values of the frequency regulation signal comprisesusing an autoregressive model to predict the future values of thefrequency regulation signal based on a history of past values of thefrequency regulation signal.
 13. The method of claim 11, furthercomprising: filtering the predicted values of the regulation signalusing a low pass filter; and using the filtered values of the regulationsignal to generate the battery power setpoints.
 14. The method of claim11, further comprising generating an objective function comprising: anestimated amount of frequency response revenue that will result from thebattery power setpoints; and an estimated cost of battery degradationthat will result from the battery power setpoints.
 15. The method ofclaim 14, further comprising using dynamic programming to select scalingcoefficients for the regulation signal and adjust the scalingcoefficients to achieve an optimal value for the objective function. 16.The method of claim 11, further comprising: calculating a frequencyresponse performance score that will result from the battery powersetpoints; and using the frequency response performance score toestimate an amount of frequency response revenue that will result fromthe battery power setpoints.
 17. The method of claim 11, furthercomprising: using a battery life model to estimate an amount of batterydegradation that will result from the battery power setpoints; and usingthe estimated amount of battery degradation to determine a cost of thebattery degradation.
 18. The method of claim 17, wherein the batterylife model comprises a plurality of variables that depend on the batterypower setpoints, the variables comprising at least one of: a temperatureof the battery; a state of charge of the battery; a depth of dischargeof the battery; a power ratio of the battery; and an effort ratio of thebattery.
 19. The method of claim 11, further comprising: using a highlevel controller to generate filter parameters based on the predictedvalues of the regulation signal; and using a low level controller tofilter the predicted regulation signal based on the filter parametersand determine the optimal battery power setpoints using the filteredregulation signal.
 20. The method of claim 11, wherein the frequencyregulation system comprises a campus having a campus power usage and apoint of intersection at which the campus power usage combines with theelectric power discharged from the battery; the method furthercomprising determining the optimal battery power setpoints based on boththe campus power usage and the frequency response signal.